JavaScript issue in Android 4.1.2 -
this question has answer here:
i have piece of javascript code :
var val = parseint("08"); alert("val : " + val);
it displays val 0.
where same piece of code in ios displays 8.
can shed more light on issue ?
thanks.
it's because using parseint without defining radix use. thinks using 8 radix.
try this:
var val = parseint('08', 10);
Comments
Post a Comment