+ 2
The variable for the computer's choice is rand, not computer.
18th Apr 2022, 11:03 PM
Simon Sauter
Simon Sauter - avatar
+ 2
In lines 9 and 12 replace all occurrences of "computer" with "rand".
18th Apr 2022, 11:30 PM
Simon Sauter
Simon Sauter - avatar
+ 1
And in line 9 you should use parentheses to group the conditions.
18th Apr 2022, 11:31 PM
Simon Sauter
Simon Sauter - avatar
+ 1
if((user === "rock" && rand === "scissors") || (user === "paper" && rand === "rock") || (user === "scissors" && rand === "paper"))
18th Apr 2022, 11:42 PM
Simon Sauter
Simon Sauter - avatar