This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Jeffrey Payne
almost 9 years

Help on JavaScript question 3/9

I wrote the cod right but it keeps saying that I need to remember to log computerChoice can anyone help, here is what I have so far var userChoice = prompt(“Do you choose rock, paper or scissors?”); var computerChoice = Math.random();

plz help

Answer 5520ebce9376766a0300051b

0 votes

Permalink

If it says you forgot to log computerchoice then that is what you have to do. Add the following line of code at the end of your program:

console.log(computerChoice);

This line of code will show the content of the variable “computerChoice” in the console.

points
Submitted by schamanu
almost 9 years

1 comments

Jeffrey Payne almost 9 years

is there anything else because it is still not working

Answer 55262ac4e39efe40ff0001bc

0 votes

Permalink

It should work. Your 2 lines of code + my addition should give you this code which made me pass exercise 3/9:

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

You could try to refresh/reload the website with F5 and run the code again or use a different browser for codecademy and see if it works then.

points
Submitted by schamanu
almost 9 years