Rock-paper-scissors game in JavaScript
It is a simple and popular rock-paper-scissors game in which the opponent is the computer, and its choice is made randomly from the three choices. The first step to start the game is to press the 'Start game' button, after which a prompt window will appear in which the user will choose one of the 3 possible game options. If the user chooses the wrong option, an automatic random option will be chosen. The end of the game is decided according to the already known rules and will be displayed by a simple alert window.