title: How to check for numbers less than one and non-numbers in JavaScript?
body: <p>I am new to JavaScript. For one of my assignments, I have to write JavaScript code for my class that determines and displays the tax amount on a user entered income. So far my code looks like this:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;JavaScript Tax Assignment&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;script&gt;
              //declare variables and collect amount enter.
              // Assign amount entered to var amountEntered.
          var amountEntered = window.prompt("Enter an income amount in dollars");
          var x = parseInt(amountEntered);
          var untaxableIncome = 12000;
          var taxBracketOne = 36000;
          var taxBracketTwo = 90000;
          var bracketOneTax = 0.15;
          var bracketTwoTax = 0.25;
          var total;
  
          //determine if the number is less than one
          if (x &lt; 1)
              {
                  alert("Enter a whole number greater than 0");
              }
          //
          else if (x == NaN)
              {
                  alert("Enter a whole number greater than 0");
              }
  
          else if (x &lt;= untaxableIncome)
              {
                  alert("You will not be charged taxes on your income");
              }
  
          else if (x &gt;untaxableIncome &amp;&amp; x &lt;= taxBracketOne)
              {
                  total = amountEntered * bracketOneTax;
                  document.write("You will need to pay " + total + " on your " + amountEntered + " income.")
              }
          else if (x &gt; taxBracketOne &amp;&amp; x &lt;= taxBracketTwo)
              {
                  total = amountEntered * bracketTwoTax;
                  document.write("You will need to pay " + total + " on your " + amountEntered + " income.")
              }
          else (x &gt; taxBracketTwo)
              {
                  document.write("I do not have the data to calculate the tax on this income.")
              }
      &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The calculations work well, the only problem I'm having is that when I enter .5 or a letter, I do not get the alert("Enter a whole number greater than 0"); What am I doing wrong?</p>