title: Javascript: Cast Math.sqrt to int?
body: <p>I've searched through google (maybe I didn't look hard enough) but I could not find how to turn Math.sqrt into an int.</p>
  
  <p>I want to use Math.sqrt for a <i>for</i> loop and I guess I need it as an int but I can't seem to figure out how to cast the result to an int.  So how do I do it?</p>
  
  <p>I tried something similar to Java:</p>
  
  <pre><code>(int) Math.sqrt(num);
  </code></pre>
  
  <p>But it didn't work.</p>
  
  <p>Thanks in advance :)</p>