Question: In JavaScript create a simple Rock-Paper-Scissor game Ask the user to choose their move using a prompt() dialog box. Keep asking the user their move
In JavaScript create a simple Rock-Paper-Scissor game
- Ask the user to choose their move using a prompt() dialog box.
- Keep asking the user their move if the user enters some invalid input.
- Then the computer chooses its move randomly and is displayed in an alert() dialog box.
- The result is displayed on the screen using alert() dialog box.
- The user should be asked using a confirm() dialog box if they want to play again, and a running score should be kept.
- If the user selects not to continue, display the final score of the user and the computer, and the winner using alert() dialog box.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
