Syntax error


#1

var userChoice = prompt("message at prompt");
var computerChoice=Math.random();
console.log(computerChoice);
if(computer choice <=0.33 )
{
computerChoice="rock";
}
else if(computerChoice >=0.34 && computer choice <=0.66 )
{
computerChoice="paper";
}
else
{
var computerChoice="scissors";
}


#2

why not combine this 3 lines:

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

into one line? you can just store the result of the prompt in userChoice directly:

var userChoice = prompt("message at prompt")

#3

but where I am wrong ?? Can anyone help !


#4

this is where you are going wrong? if you still struggle, place an updated version of your code


#5

updated the code but still getting the error.


#6

computer choice is not the right variable, it should be computerChoice, replace all computer choice by computerChoice