> Either the leading zero is ignored, or it indicates octal, as it does in many languages, including JavaScript. This is false. In JavaScript, a leading zero, unless accompanied by a lowercase oh ('o') does indicate the number is written in octal. 08 === 0o10; // true Here, the left side is still base 10, while the right side is base 8.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Javascript for many years has assumed a leading zero means an octal prefix, and it's only recently that behavior has changed.
EDIT: Also your example does not disprove this. Here's another example that you should try running in the console:
011 === 11; // false
011; // 9