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

  1. Ask the user to choose their move using a prompt() dialog box.
    1. Keep asking the user their move if the user enters some invalid input.
  2. Then the computer chooses its move randomly and is displayed in an alert() dialog box.
  3. The result is displayed on the screen using alert() dialog box.
  4. The user should be asked using a confirm() dialog box if they want to play again, and a running score should be kept.
  5. 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!