How come im just finding this out?

how come im just finding out that if u do a javascript variable that equals “’” it will convert stuff to a string this is baffling me cuz it seems like something i shoulda already knew

<script>
var per = "'";
const gameam = document.querySelector('#counter');
document.getElementById("gamearea").innerHTML = document.getElementById("gamearea").innerHTML + "<article><p class=gametitle>"+document.getElementById("gamenamer").value.toString()+"</p><img width=200 height=200 alt="+per+document.getElementById("gamedesc").value.toString()+per+"src="+per+document.getElementById("imagegiver").value.toString()+per+"/></article>";
//the game description needs work
</script>

like bruuuh it came out rly well and now game making kinda works on my website

But wait, you defined it as a string

ik but i thought it would try to make a string break off this whole time

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.