Computer Choice: Part 1


#1

MY CODE:

var userChoice = prompt("Do you choose rock, paper or scissors");
var computerChoice = function(math.random());

console.log(computerChoice);
"OOPS TRY AGAIN: There was a problem with your syntax."

WHA'S THE PROBLEM? I DON'T UNDERSTAND !


#2

i think you forgot the "?" in Do you choose rock, paper or scissors... tell me if it did not work...


#3

He needs to remove the function. Example:

var computerChoice = math.random();

#4

you are correct but did you add the question mark because if you did it should work. :smiley:


#5

Yes, you also need the ?. Then it should work.


#6

omg it took me this long to realize your not the topic creator XD


#7

Lol, I was just humouring you! :wink:


#8

Capital M in math................................................


#9

var computerChoice = function(math.random());

You have an extra parentheses at the end. Also remove function


#10

A post was split to a new topic: Unexpected Token Error


#11

var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random()
console.log(computerChoice);