So I'm trying to get my code to work, but I'm just getting a error.

ReferenceError: computerChoise is not defined

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

if (computerChoise <= 0 && 0.33){
    console.log (computerChoise === ("rock"));
} else if (computerChoise >= 0.34 && 0.66){
         console.log (computerChoise === ("paper"));
    } else {
         console.log (computerChoise === ("scissors"));

I just need help, please.


The reason of the error is the fact that you created variable computerChoice, but you use computerChoise (s instead of c).


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.