0
This code runs on my computer but not here why?
gender=1; like=1; spam=1; gender=prompt('Is your person a boy'); if (gender=='yes') { like=prompt('do they like beans'); } else if (gender=='no') { spam=prompt("Do they spam Julian2?"); }if (like=='yes') { alert ('you are thinking of Julian2!!!!!'); }else if (like=='no') { alert ('ewww ur thinking of Aparri'); } if (spam=='yes') { alert ('you are thinking of WisteriaMOON!'); } else if (spam=='no') { alert ('you are thinking of Beppar(who is mean to me)’); }
10 Réponses
+ 16
It worked for me. You just have to make sure that 'You are thinking of Beppar' line is a string (should be green)
+ 2
The "Beppar" method or function is not supported here in Sololearn. You'd be surprised how many functions aren't supported but I believe if you use the website to run your code instead of the app then it will work.
+ 2
Lol you had me there for a moment because I didn't know what Beppar was and I know quite a bit about Javascript 😁
+ 2
You can use canvas yes, it is very useful to make games yes but you can also create games using a combination of other tags. You can check out my codes to see what I mean by that. You must just basically know what you want to do first and then use the correct tools to do what you want to.
+ 1
Yes, together with it's brackets. You could use this instead:
alert ('you are thinking of Beppar who is mean to me’);
0
Oops that's just a joke lol I can fix it
0
So just remove that?
0
Ok tysm
0
Thx all and just a question if u are making a game u use HTML for the canvas correct?