0
rock paper scissors
okay, so idk why but the output seems to always be You Lose! and i dont know why, any help? https://code.sololearn.com/WVcxdscDjKJ2/?ref=app
8 Respuestas
+ 2
The variable for the computer's choice is rand, not computer.
+ 2
In lines 9 and 12 replace all occurrences of "computer" with "rand".
+ 1
And in line 9 you should use parentheses to group the conditions.
+ 1
if((user === "rock" && rand === "scissors") || (user === "paper" && rand === "rock") || (user === "scissors" && rand === "paper"))
0
what do you mean? what should i do to fix it?
0
ahh yes that makes sense
0
how would i group it? Ive seen it before but i never really understood it.
0
ahh okay, i see