title: Checking if variable is an Integer in Javascript
body: <p>I'm starting to learn JavaScript at school and one of the assignments require me to check user's input whether it is an Integer or not.</p>
  
  <p><strong>This code DOES NOT WORK FOR ME ON CHROME</strong>.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var person = prompt("Please enter your name", "Enter Name");
  alert("Hello " + person);
  var age = prompt("Please enter your age", "Enter age");
  
  if (age == parseInt(age, 10))
      alert("data is integer")
  else
      alert("data is not an integer")</code></pre>
  </div>
  </div>
  </p>
  
  <p>Whether I enter a string or integer in my prompt box, it always display the "data is not an integer" message.</p>