I need help as my syntax is having a problem but I'm not sure what it is


#1

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


#2

The return keyword is only used inside function implementation but not outside. So in your if/else if/else block(which is not in a function) you rather have to set computerChoice to whatever you are returning