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

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -