title: Console.log comparison with number
body: <p>I'm on Lesson 28/28 of Getting Started with Programming of Codeacademy's Javascript tutorial. I want to create a program in which a prompt comes up where I enter a quantity and if the quantity is </p>
  
  <pre><code>var numberOfLessons = prompt("How many lessons have you taken?")
  
  if(numberOfLessons===28)
  {
      console.log("I finished my first course!")
  }
  
  else if(numberOfLessons&lt;28)
  {
      console.log("Do more lessons!")
  }
  else if(numberOfLessons&gt;28)
  {
      console.log("Do less lessons D:")
  }
  </code></pre>
  
  <p>When I run the program, if I input a quantity less than 28, then the proper "Do more lessons!" comes up. However, with ===, if I input 28, then console.log doesn't output anything. It's completely blank. However, if I use == in line 3, instead of ===, then inputting "28" into the prompt returns the proper "I finished my first course!"</p>
  
  <pre><code>var numberOfLessons = prompt("How many lessons have you taken?")
  
  if(numberOfLessons===28)
  {
      console.log("I finished my first course!")
  }
  
  else if(numberOfLessons&lt;28)
  {
      console.log("Do more lessons!")
  }
  
  else if(numberOfLessons&gt;28)
  {
      console.log("Do less lessons D:")
  }
  </code></pre>
  
  <p>Why is it that == works but === doesn't? My first thought (or, rather, my friend's first thought) was that it's because numberOfLessons is a variable and === requires the types of the two things being compared to be the same, and a variable is not the same as a number. But, in that case, why would it work for the "else if" statement where > is being used?</p>