I've been following a course in Treehouse about JavaScript. I'm currently on the parseInt method. In one of their example, this code was shown:
var j = parseInt("012");
saving it and running in Chrome's console resulted to 10 in their example (which is understandable as 012 is 10 in octal), but in my own browser, it resulted to 12. Is it correct or am I doing something wrong?
parseInt(), ALWAYS pass the desired radix as the second argument. Always.