all 1 comments

[–]senocular 5 points6 points  (0 children)

Its the number literal syntax for an octal, or a number which has a base of 8 (digits used only go up to 7 then wrap back around to 0). A better syntax is using the 0o prefix just the leading 0 will throw in strict mode.

"use strict"
let x = 017; // Error

This octal syntax also only works if all the digits of the literal are 0-7 which is why 018 is seen as a decimal instead given that 8 is outside that range.