News for hackers. Stuff that matters.
Re:Are You a JavaScript Guru? Try This Test by jakub_g on Saturday February 02, 2013 @03:55PM (#5157297)
I must admit you're right with the first part. I haven't thought twice nor checked things. Thanks for pointing it out.

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...

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!