No idea what the **** is wrong. computerChoice part two


#1

https://www.codecademy.com/courses/javascript-beginner-en-Bthev-mskY8/0/4?curriculum_id=506324b3a7dffd00020bf661#

this is my code

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

it shows unexpected token {

Replace this line with your code.


#2

else can't have a condition

else means: what else remains, if you set a condition, this might not be true


#4

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