javascript - Where is ther unexpected Syntax error? -
the console states there unexpected { in code. went on syntax several times , cannot seem find it.
var userchoice = prompt("do choose rock, paper, or scissors?"); var computerchoice = math.random(1); if (computerchoice <= 0.33){ computerchoice = "rock"; } elseif (computerchoice <= 0.67 && computerchoice >= 0.34) { computerchoice = "paper"; } else { computerchoice = "scissors"; }
elseif should have space in between.
var userchoice = prompt("do choose rock, paper, or scissors?"); var computerchoice = math.random(1); if (computerchoice <= 0.33){ computerchoice = "rock"; } else if (computerchoice <= 0.67 && computerchoice >= 0.34) { computerchoice = "paper"; } else { computerchoice = "scissors"; }
Comments
Post a Comment