What If I Don't Actually Like My Users?
Posted Apr 5, 2008 15:09 UTC (Sat) by
Wummel (subscriber, #7591)
Parent article:
What If I Don't Actually Like My Users?
The Javascript parseint() interface comes to my mind. Usually, it parses strings to integers with a decimal base. But it silently switches to octal when the string has leading zeros: parseInt('08') equals zero!
So, you pretty much always have to specify the base as second argument, which is annoying: parseInt('08', 10) gives the expected 8.
(
Log in to post comments)