JavaScript Programming

LAB 1 – INTRODUCTION TO JAVASCRIPT

.html and .js files in single .ZIP file.

OVERVIEW

In this lab, we will begin to see a bit more about how scripts and directly interact with other applications — in this case how JavaScript interacts with a Web browser.

Again, it should be emphasized that this exercises are not about teaching “web design” or “web programming” in general; instead we are just using the browser as a “platform” for our actual scripts… and that the creation and execution of these scripts requires no tools above and beyond what you likely already have installed on any machine… a web browser and a text editor.

OBJECTIVE

Create a simple “Rock Scissors Paper” game in a web page where YOU play against the computer for a given number of rounds (specified by you).

INSTRUCTIONS

  1. Create a “web page” with the following components:
    • An input field for the “number of rounds to play”
      • The “number of remaining” rounds should also be displayed somewhere on the screen.
    • button to “Start” the game play.
      • The function attached to this button can “setup” the rest of the game.
        • For example: initialize counters, show/hide other components, etc.
    • set of buttons for the player to choose their play:
      • Rock
      • Scissors
      • Paper
    • An output field where the computer displays it’s play.
      • Rock
      • Scissors
      • Paper
    • An output field which displays the result of the current round:
      • For example: Computer won with rock breaking scissors.
  2. The game should end when the number of rounds specified at the beginning have been played.

    • The “overall winner” should be displayed.
      • For example: Human wins after winning 3 of 5 rounds.

Need help with this assignment or a similar one? Place your order and leave the rest to our experts!

Quality Assured!

Always on Time

Done from Scratch.