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)’); }

16th Apr 2017, 9:33 PM
FOXES ARE SICK6969
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)
16th Apr 2017, 9:45 PM
Michael Foster
Michael Foster - avatar
+ 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.
16th Apr 2017, 9:38 PM
Ghauth Christians
Ghauth Christians - avatar
+ 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 😁
16th Apr 2017, 9:42 PM
Ghauth Christians
Ghauth Christians - avatar
+ 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.
16th Apr 2017, 9:51 PM
Ghauth Christians
Ghauth Christians - avatar
+ 1
Yes, together with it's brackets. You could use this instead: alert ('you are thinking of Beppar who is mean to me’);
16th Apr 2017, 9:45 PM
Ghauth Christians
Ghauth Christians - avatar
0
Oops that's just a joke lol I can fix it
16th Apr 2017, 9:40 PM
FOXES ARE SICK6969
0
So just remove that?
16th Apr 2017, 9:43 PM
FOXES ARE SICK6969
0
Ok tysm
16th Apr 2017, 9:45 PM
FOXES ARE SICK6969
0
Thx all and just a question if u are making a game u use HTML for the canvas correct?
16th Apr 2017, 9:47 PM
FOXES ARE SICK6969