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

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -