title: How to get value form Input as numbers to calculate gcd?
body: <p>I use <a href="http://cdnjs.cloudflare.com/ajax/libs/mathjs/1.2.0/math.min.js" rel="nofollow">math.js</a> to calculate gcd for a series of numbers wich are taken from input. Among the tested options I mention:</p>
  
  <ul>
  <li>parseInt() and parseFloat()</li>
  <li>IaNr=document.getElementById("nrs").value </li>
  <li>math.gcd(nrs.value);</li>
  <li>math.gcd($("#nrs").val())</li>
  <li>IaNr.toString()</li>
  </ul>
  
  <p>but it doesn't work.
  what am I missing, because it doesn't calculate the numbers from input. it works when I provide the numbers directly. ex: <code>math.gcd(4, 8, 25,74)</code></p>
  
  <pre><code>&lt;script src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/1.2.0/math.min.js"&gt;&lt;/script&gt;  
  
  $(function(){
  
  IaNr=$("#nrs").val()
  
  DoGcd=math.gcd(IaNr)
  
  $("#show").html(DoGcd)
  })          
  
  &lt;input id="nrs"  value="14,92,34,78"&gt;
  
  &lt;div id="show"&gt;&lt;/div&gt;
  </code></pre>