cl_muc
September 16, 2013, 8:32pm
1
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.
david
September 17, 2013, 3:03am
3
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