Lesson 3 - If/Else

Learning If/Else

  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:
    if(age > 10)
    {
      alert("You are super old!");
    }
    else
    {
      alert("You are young!");
    }
    
  4. Run your script
  5. Create a new question and anwsers
  6. Run your script