parseInt("08") returns NaN

Hello,

the funtion calls

parseInt("08"); // returns NaN 
and 
parseInt("09"); // returns NaN

both return NaN.

The funtion call ```
parseInt(“07”); // returns 7


So this obviously seems to be a bug.

Does anybody else have this problem?

Thanks,
Christoph

Yes.

Also, parseInt(“008”) and parseInt(“009”) return 0.0, and parseInt(“0008”) parseInt(“0009”) also return 0.0.

parseInt(“0019”) returns 1.0… weird.

parseInt makes assumptions when leading zeros are present and the radix is not specified. Specifically with the version of Rhino Servoy is using octal is assumed.

https://developer.mozilla.org/en-US/doc … s/parseInt