Build "Rock, Paper, Scissors" Computer Choice: Part 2


#1

I'm getting the random number but I don't get the rock, papeer, or scissor return.

var userChoice = prompt('Do you choose rock, paper or scissors?');
//Ask user for chocie

//Declaring computerChocie with random selection of 0 & 1.
var computerChoice = Math.random();

console.log(computerChoice);

{

if (computerChocie < 0.33) {
    console.log("Rock");
}
else if (computerChocie > 0.66) {
    console.log("paper");
}
else {
     console.log("scissors");
 }
console.log(computerChoice)

}


#2

You are logging the result instead of assigning it to computerChoice.


#3

I don't understand by not defined.

r userChoice = prompt('Do you choose rock, paper or scissors?');
//Ask user for chocie

//Declaring computerChocie with random selection of 0 & 1.
var computerChoice = Math.random();

console.log(computerChoice);

{

if (computerChocie < 0.33) {
   computerChocie ="Rock";
}
else if (computerChocie > 0.66) {
     computerChocie ="paper";
}
else {
     computerChocie = "scissors";
 }
console.log(computerChoice + userChoice);

}