Skip to content
JS
JavaScript error

SyntaxError

The JavaScript strict mode-only exception "0-prefixed octal literals are deprecated; use the "0o" prefix instead" occurs when deprecated octal literals (0 followed by digits) are used.

Reference entryJavaScriptFetched
SyntaxError: Octal literals are not allowed in strict mode. (V8-based)
As listed by MDN Web Docs
SyntaxError: Decimals with leading zeros are not allowed in strict mode. (V8-based)
As listed by MDN Web Docs
SyntaxError: Unexpected number (V8-based)
As listed by MDN Web Docs
SyntaxError: "0"-prefixed octal literals are deprecated; use the "0o" prefix instead (Firefox)
As listed by MDN Web Docs
SyntaxError: Decimal integer literals with a leading zero are forbidden in strict mode (Safari)
As listed by MDN Web Docs
Category
SyntaxError in strict mode only
Severity
error
Runtime
both
or press Cmd/Ctrl + Enter. The text is only sent to this site to match it.
Source: MDN Web Docs. Data fetched 2026-09-25T01:48:37.273Z.