Re:Are You a JavaScript Guru? Try This Test
by Stratoscope on Saturday February 02, 2013 @05:32PM
(#5157657)
Oh wow, you're right about parseInt(). For some reason I thought the octal thing was standard across browsers. That's what I get for adding that throwaway comment at the end without checking it. Thanks for catching that!
Regaring parseInt(), the story is even more complex though :) You should never use it without the radix because that behavior is not reliable when it comes to implying octal representation. Calling parseInt("016") yields 16 in Chrome (ES5 compliant [1]), while 14 in Firefox, Opera and IE8.
[1] https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...