What's wrong with my code? Where's the problem?


I did everything right (i guess) and used the hint, tried to print out computerChoice but it says TypeError: computerChoice is not a function!! What did i do wrong?


TypeError: computerChoice is not a function

var userChoice = prompt("Do you want to play rock, paper, scissors?")
var computerChoice = Math.random();




is a function call. But computerChoice is a variable, not a function. To log a variable to the console, put the variable name inside console.log:

console.log(/*variablename without brackets here*/)


Thanks it worked! I appreciate your help :slight_smile: