โ›”octal literals not allowed in strict modeโ—๏ธ

๐Ÿšง under construction

JS โŸฉ error โŸฉ SyntaxError โŸฉ delete of an unqualified identifier in strict mode

let x = 010;    // โ— octal literal
let y = 0x10;   // โญ hexadecimal literal

//  mode:    sloppy      strict
// -------------------------------------
x,        // โœ… 8       โ›” SyntaxError
y,        // โœ… 16      โœ… 16

// โ›” SyntaxError: Octal literals are not allowed in strict mode.

Last updated