The capital 'M' in 'Math' is important! AND CAPITAL


#1

https://www.codecademy.com/courses/javascript-beginner-en-Bthev-mskY8/0/3?curriculum_id=506324b3a7dffd00020bf661#

Oops, try again. Did you set var computerChoice = Math.random() ? The capital 'M' in 'Math' is important!

Replace this line with your code.

var computerChoice = Math.random();
console.log(computerChoice);
if(computerChoice < 0.33) {
    computerChoice = ("rock")
} else if (computerChoice <= 0.67) {
    computerChoice = ("paper")
} else {
    computerChoice = ("scissors")
}
console.log ("Computer " + computerChoice)

#2

Hi if you are at Computer Choice: Part 1 your code should be just this part

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

var computerChoice = Math.random();
console.log(computerChoice);

#3

var userChoice = prompt ("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
console.log(computerChoice);
if(computerChoice < 0.33) {
computerChoice = ("rock")
} else if (computerChoice <= 0.67) {
computerChoice = ("paper")
} else {
computerChoice = ("scissors")
}
console.log ("Computer " + computerChoice)

Still mistake:
Oops, try again. Did you set var computerChoice = Math.random() ? The capital 'M' in 'Math' is important!


#4

What @wizmarco is trying to say is that Part1 requires computerChoice to be a number so if you already converted it to a string it gets confused and assumes that you didn't use Math.random correctly. So the question is are you working on part 1 or 2? Also have you tried to refresh the page yet?


#5

Thank you!
It was Part 1.
It needed only
var computerChoice = Math.random();
console.log (computerChoice);