how to read value zero using parseInt function
<pre><code>var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
var resstr=result.toString();   
var res=resstr.split(".");
var test=parseInt(res[1].charAt(0));
var test1=parseInt(res[1].charAt(1));
</code></pre>

<p>this is my code when my value in res variable is 5.90 then I alert test &amp; test1 variable
in test alert it shows correct value i.e. "9" but in test1 alert it shows message like "Nan"
if res variable contain value 5.35 then it work correct i.e.test=3 &amp; test1=5
only it does not work when test1 contains value "0" it gives message "Nan"</p>
