Here is something to get you started:

Your Mission

Create a guessing game using only JavaScript pop-ups. Your game should:

  1. Explain what the game is. (It is a "Guess the number" game.)
  2. Ask the user if he/she wants to play.
  3. Ask the user to type a number between 0 and 10.
  4. Check the number and respond:
    1. The guess was too high, or
    2. The guess was too low, or
    3. The guess was correct! You win!
  5. Repeat. (How many chances does the player get?)
  6. Tell the player he/she has lost if he/she runs out of chances.

Optional: Add a question asking if the player wants to go again.

Tips

DO NOT modify this page. Start a new HTML page of your own. Or copy this one and delete everything inside the wrapper DIV.

Use the file number.js, linked to this page, and write new JavaScript functions to do what is asked of you, above. Some code is there to help you, but you must write new functions to make the game.

NOTE: On this page, you see three links. On YOUR page, there will be only ONE link, which will start the game.

Like this? Thank @macloo