Hello! Did you want feedback or do you have a specific question?
Some feedback:
The whole code is very well thought out, and correctly implements the instructions. Just one thing, you might want to make the if…else if…else
statements here into a switch…case
:
if (getComputerChoice === 0) {
return 'rock';
} else if (getComputerChoice === 1) {
return 'papper';
} else {
return 'scissors';
};
One other thing, after closing curly braces }
, you don’t need a semicolon (in general). Here is a good article on semicolons in JS.
I hope this helps!
1 Like
Just a quick edition to @codeneutrino’s feedback:
I believe there is a typo on line 14:
return 'papper';
Other than that it is very nicely written, and everything seems to work perfectly. Great job
1 Like
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.