Computer Choice Part 2


#1

Can anyone help me with this code???

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

Oops, try again. Your code doesn't look quite right. Check the Hint if you need help!


#2

Can someone please explain the difference between return and console.log?


#3

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

you spelled some stuff wrong look over the spelling then try again, i put it in arrows


#4

check your spelling. you spelled computer wrong.


#5

That's a whole different question and you would be better off using a different thread for this. Maybe this helps: