Computer Choice Part ll


#1


It says unexpected token {

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

What is wrong?


#2

else can't have a a condition since it is everything else


#3

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