This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Syed Kazmi
over 8 years

Help 3/9 what is wrong with my code?

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.66) { computerChoice = “paper”; } else if(computerChoice < 1){ computerChoice = “scissors”; } var compare = function (choice1, choice2) { if (choice1 === choice2) { return “The result is a tie!” }};

Answer 55f882c895e378047c000683

0 votes

Permalink

This line of code return "The result is a tie!"

You are missing a semi-colon at the end.

points
Submitted by polygonner
over 8 years

Answer 55fafff586f55237ae0000b0

0 votes

Permalink

u wrote else if twice only need it once

points
Submitted by jaleesha sanderson
over 8 years