Computer Choice: Part 2


I cannot wrap my head around what is wrong. I know lots of similar problems but i have tried comparing no difference.Help. Tq.

Oops, try again. There was a problem with your syntax.

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

if (computerChoice < 0.34 ){
     computerChoice = "rock";
elseif (computerChoice <=  0.66){
    computerChoice = "paper";
else {
    computerChoice = "scissors";


Put a space between else and if!


Because of a typo... Thanks!


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