Alex Leโ€™s Blog ๏ฟฝ Blog Archive ๏ฟฝ โ€œsaferโ€ parseInt() for JavaScript with plus unary operator:

Additionally, parseInt and make different assumptions about the radix when thereโ€™s a leading zero. โ€012โ€ณ returns 12, but parseInt(โ€012โ€ณ) returns 10. The leading zero causes parseInt to treat it as an octal number in probably all browsers, despite octals being summarily deprecated in ES3. Of course, you can use parseInt(โ€012โ€ณ,10) to get around that.

Ran into this while looking for info on using the "unary plus".  See?  This is another reason why Crockford's not full of it, for those who still think he is.  Missing radix !== jslinted.

Labels: ,