0
I can't get this if statement to work?
I can't get this code to work. Anyone tell me why and how to correct it? https://code.sololearn.com/WuM5vVBVWrHk I want the code to let the user click a button and the code to set the players number to that button. I then want the code to generate a random number and if that number matches the players number then the player is out. eg: player clicks button 7 so player's number == 7. The random number is picked and it is 7 so it shows an alert box saying game over
2 Answers
+ 4
What do you want to achieve and what are you getting?
+ 1
First you forgot to add "( )" in function declaration (line 26) it should be:
function myRandom() {
...
}