Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started