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

Popular posts from this blog

Eclipse formatter for java ending braces -

ruby - Nesting modules inside of a Rails eninge gem -

java - Are there any classes that implement javax.persistence.Parameter<T>? -