Computer Choice part 2 never gives scissors


#1

Computer Choice: Part 2

Never returns Scissors


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

if(computerChoice <= 0.33) {
    computerChoice = "Rock";
} else if (computerChoice <= 066) {
    computerChoice = "Paper";
} else {
    computerChoice = "Scissors";
};
console.log(computerChoice)

Ive tried all ive learn up until know but no idea why scissors is never an option


#2

On this line, did you mean the condition to evaluate for 0.66?


#3

OMG IM STUPID.... HOLY MOLY...

Lol Thanks that explains a lot


#5

Been there, done that too :slight_smile:


#6

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