Lesson 2 - Ask

Ask for input using the prompt command.

  1. Open the Javascript and output window
  2. In the Javascript window type:
    var age = prompt("How old are you?");
    
  3. In the Javascript window type:
    alert("You are " + age + " years old");
    
  4. In the output windows click: "Run with JS"
  5. Change the question and anwser
  6. Run your script