Skip to content
JS
JavaScript error

SyntaxError

The JavaScript exception "octal escape sequences can't be used in untagged template literals or in strict mode code" occurs when octal escape sequences are used in strict mode string literals or untagged template literals.

Reference entryJavaScriptFetched
SyntaxError: Octal escape sequences are not allowed in strict mode. (V8-based)
As listed by MDN Web Docs
SyntaxError: \8 and \9 are not allowed in strict mode. (V8-based)
As listed by MDN Web Docs
SyntaxError: Octal escape sequences are not allowed in template strings. (V8-based)
As listed by MDN Web Docs
SyntaxError: \8 and \9 are not allowed in template strings. (V8-based)
As listed by MDN Web Docs
SyntaxError: octal escape sequences can't be used in untagged template literals or in strict mode code (Firefox)
As listed by MDN Web Docs
SyntaxError: the escapes \8 and \9 can't be used in untagged template literals or in strict mode code (Firefox)
As listed by MDN Web Docs
SyntaxError: The only valid numeric escape in strict mode is '\0' (Safari)
As listed by MDN Web Docs
Category
SyntaxError
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.