title: Cide to know if a triangle is right-angled or not the math works fine but can't seem to get the value from the input
body: <p>I tried changing the value into an integer with <code>parseInt</code> it still didn't work and whenever I run it it always just says <code>NaN</code>.</p>
  
  <p>I tried changing the variables <code>a1</code>, <code>b1</code> and <code>c1</code> to <code>number</code> directly by (writing <code>a1 = 3</code> for example) and it worked fine then. I'm still a novice and I don't know what to do. </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  &lt;title&gt;document&lt;/title&gt;
  &lt;link rel="stylesheet" href="style1.css"&gt;
  &lt;/head&gt;
  &lt;body&gt; 
  &lt;h1&gt; Find c or know if it's a right-angle triangle?&lt;/h1&gt;
  &lt;div id="isIt"&gt;
     &lt;h5&gt;Please enter the lengths of each side.&lt;/h5&gt;
  //input area where you enter the sides of the triangle
  &lt;input id="a" type="number" min="0.1" placeholder="a"&gt;
  &lt;input id="b" type="number" min="0.1" placeholder="b"&gt;
  &lt;input id="c" type="number" min="0.1" placeholder="c"&gt; 
  &lt;br&gt;
  &lt;button onclick="isIt()"&gt;is it a Triangle?&lt;/button&gt;
  &lt;button onclick="findc()"&gt;What is c?&lt;/button&gt;
  &lt;/div&gt;
  &lt;p id="answer"&gt;&lt;/p&gt;
   &lt;script&gt;
   //where my problem is
   var a1 = (document.getElementById('a').value;
   var b1 = document.getElementById('b').value;
   var c1 = document.getElementById('c').value;
   var m = Math.sqrt( a1*a1 + b1*b1);
  
   //function to know if its a triangle
   function isIt() {
      if (c1 === m) {
      document.getElementById('answer').innerHTML = 'YES!';
      }else{
      var trueC0 =  Math.sqrt((a*a) + (b*b));
      var trueC2 = trueC0.toString();
      document.getElementById('answer').innerHTML = "NO! c needs to be " + trueC2 + " too be a 
      right-angle triangle";
  
  }
  }
  //function to calculate c
  function findc() {
  
  var c = Math.sqrt( a*a + b*b);
  document.getElementById('answer').innerHTML = c.toString() ;
  }
  &lt;/script&gt;   
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>