title: checking if input is integer using javascript
body: <p>that's what I have tried :</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
  function myFunction() {
  var num = document.getElementById("num").value;
  if (Number.isInteger(num)) { 
  document.getElementById("show").innerHTML = "Number is integer";
  } else {
  document.getElementById("show").innerHTML = "Number is not integer";
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;input id = "num"&gt;&lt;/input&gt;
  &lt;button onclick = "myFunction()"&gt;Submit&lt;/button&gt;
  &lt;p id = "show"&gt;Result Appears Here&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the problem here is that i get "number is not integer" all the time even if the number is integer , the code supposed to check if input is integer or not thanks in advance</p>