Computer choice: Part 1 - Oops try again, Did you set var computerChoice = Math.random()? The capital 'M' is important


#1

What am I doing wrong?
I filled in the following code underneath. When pressing save and submit I receive the following code "Oops, try again. Did you set var computerChoice = Math.random()? The capital 'M' in 'Math' is important".

Anyone any idea what I do wrong?

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

if(computerChoice < 0.33){
computerChoice="rock";
}
else if (computerChoice <= 0.67){
computerChoice="paper";
}
else {
computerChoice="scissors";
}


#2

Did you read the Instructions?

  1. Print out computerChoice so you can see how Math.random() works. This step isn't needed for the game - just useful for learning!

#3

Thanks David.
Missed that part, I was too much focused on writing the code.