3) Needing Help


#1



enter link description here


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

I do not know what is wrong. Can you help me?


#2

You missed step 2 on instructions

Print out computerChoice so you can see how Math.random() works. This step isn't needed for the game - just useful for learning!
Even though it says its not needed for the game but you need to do it in the lesson


#3

I'm sorry, but I do not know what ths meansi


#4

You need to use console.log to log computerChoice


#5

Sorry for the late response.

but

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

still does not work. can you show me how to do it?


#6

no leave your original code:

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

now add in console.log(computerChoice); on the next line

You see first we ask user, then we create a random no and we use console.log to log the random no so we can see it


#7

Sorry.

I have a message which says "Oops, try again. Your code doesn't look quite right. Check the Hint if you need help!"
Console log says "TypeError: console.log is not a function"

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


#8

I don't see anything wrong with your code, I even ran it in the lesson and it worked.
Please reset lesson and paste in your code again should work..

Refreshing or switching browsers could do the trick..


#9

Thanks! I think it was the connection or something