This is a simple Rock, Paper, Scissors game built with JavaScript. It allows the user to play against the computer in a best-of-five match, and keeps track of the number of wins, losses, and draws.
How to Play
Open the game in a web browser. The game will start automatically, with an introductory message displayed in an alert. The user will be prompted to choose "rock," "paper," or "scissors." The computer will randomly select one of these options as well. The game will display an alert indicating the computer's choice and the outcome of the round (win, loss, or draw). The game will repeat this process for a total of five rounds. At the end of the game, the user will be shown an alert with the final score (number of wins, losses, and draws). Notes
If the user enters an invalid choice (anything other than "rock," "paper," or "scissors"), the game will display an error message and exit. The game keeps track of the score using variables wins, losses, and draws. These variables are incremented each time the user wins, loses, or draws a round, respectively.