Computer Choice: Part 2


#1

Hi, I'm not too sure what I did wrong here.


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


SyntaxError: Return statements are only valid inside functions.


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.67) {
    computerChoice = "paper";
}
else {
    return "scissors";
}


#2

Oh nevermind, I saw my mistake and I forgot to use 'computerChoice' instead of 'return'!


#3