3 ms·
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 m
by jakub_g 14y ago
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/Reference/Global_Objects/parseInt https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...
- Stratoscope 14y agoOh 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!