A simple JavaScript-only version of the classic childhood game, Rock-Paper-Scissors, played against the computer.
When the page is loaded, a prompt will ask the player to enter a choice of Rock, Paper, or Scissors. The computer makes a random choice, and the results are displayed in an alert box. Then the player is asked if they would like to play another round. If they click Ok, another round is played, and if they click Cancel, the game ends.
- Flow control: if...else, do...while, and switches are used
- Window dialog boxes: alert(), confirm(), and prompt() are used