Skip to content
JS
JavaScript error

SyntaxError

The JavaScript exceptions "unexpected token" occur when the parser does not see a token it recognizes at the given position, so it cannot make sense of the structure of the program. This might be a simple typo.

Reference entryJavaScriptFetched
SyntaxError: Unexpected token ';' (V8-based)
As listed by MDN Web Docs
SyntaxError: Unexpected identifier 'x' (V8-based)
As listed by MDN Web Docs
SyntaxError: Unexpected number (V8-based)
As listed by MDN Web Docs
SyntaxError: Unexpected string (V8-based)
As listed by MDN Web Docs
SyntaxError: Unexpected regular expression (V8-based)
As listed by MDN Web Docs
SyntaxError: Unexpected template string (V8-based)
As listed by MDN Web Docs
SyntaxError: unexpected token: identifier (Firefox)
As listed by MDN Web Docs
SyntaxError: expected expression, got "x" (Firefox)
As listed by MDN Web Docs
SyntaxError: expected property name, got "x" (Firefox)
As listed by MDN Web Docs
SyntaxError: expected target, got "x" (Firefox)
As listed by MDN Web Docs
SyntaxError: expected meta, got "x" (Firefox)
As listed by MDN Web Docs
SyntaxError: expected rest argument name, got "x" (Firefox)
As listed by MDN Web Docs
SyntaxError: expected closing parenthesis, got "x" (Firefox)
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.274Z.