Computer choice part2


#1

What is wrong with my code?

Problem with syntax

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


#2

this is the the wrong of way of writing theless than or equal to operator it is written like this,

<=
and not,

=<


#3

ooo I see

Thanks bro :grin:


#4

You're welcome :slight_smile:


#5

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