title: My code is saying that number 1 is prime. How to fix that?
body: <p>So,</p>
  <p>I'm starting to learn how to code and now I have only one problem.
  My code is functioning very well, until he says that the numbers 1 and 0 are prime.</p>
  <p>I already tried to add them to exception, change the calculation and still printing that is prime.</p>
  <p>Here's the code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function testPrimeNumber(num)
  {
      Number(num)
      for (var i = 2; i &lt; num; i++)
      {
          if (num % i == 0)                
          {
              return ("The number "+num+" isn't prime.");                
          }                                
          else {}                
      }      
      return ("The number "+num+" is prime.");   
  } 
  
  console.log("result for 1:", testPrimeNumber(1));</code></pre>
  </div>
  </div>
  </p>
  <p>What am I doing wrong here?</p>