title: Make Math.max.apply read variables
body: <p>I am fairly new to coding and tried something for fun, however I am struggling with it</p>
  
  <pre><code>function result() {
  var n1 = document.getElementById("N1");
  var n2 = document.getElementById("N2");
  var n3 = document.getElementById("N3");
  var a = [n1,n2,n3];
  var temp = Math.max.apply(Math, a)
  var out=document.getElementById("res").innerHTML = temp;
  }
  </code></pre>
  
  <p>I am trying to make it output the numbers that are being input through HTML </p>
  
  <pre><code>&lt;td&gt;&lt;input class="textBox" id="N3" type="number"/&gt;&lt;/td&gt;
  </code></pre>
  
  <p>However it wont read it as number and will just display NaN. Help would be appreciated.</p>