Help with 4 computer choice part 2


#1

I can't figure this out, help?
var userChoice = prompt("Do you choose rock, paper, or scissors?");
var computerChoice = Math.random();
console.log(computerChoice);
if (computerChoice <= 0.33){
set("rock");
}
else if (computerChoice >= 0.67){
set("scissors");
}
else function {
set("paper");
}


#2

After else should be nothing but a { :slightly_smiling:
and unless you made your own set function you just set the value by assigning them to computerChoice.


#3

I didn't understand this answer


#4

This answer is months old... What I tried to say is that this:

else function {

is definitely wrong:

and that this:
set("rock");
is probably wrong because it uses the word set as if it is the name of a function but there is no set-function in the code above.

Is your code anything similar to the code above? If not please do not revive dead threads but write your own question providing informations like your code and the error message.