Skip to content
JS
JavaScript error

SyntaxError

The JavaScript exception "invalid assignment left-hand side" occurs when there was an unexpected assignment somewhere. It may be triggered when a single = sign was used instead of == or ===.

Reference entryJavaScriptFetched
SyntaxError: Invalid left-hand side in assignment (V8-based)
As listed by MDN Web Docs
SyntaxError: invalid assignment left-hand side (Firefox)
As listed by MDN Web Docs
SyntaxError: Left side of assignment is not a reference. (Safari)
As listed by MDN Web Docs
ReferenceError: Invalid left-hand side in assignment (V8-based)
As listed by MDN Web Docs
ReferenceError: cannot assign to function call (Firefox)
As listed by MDN Web Docs
ReferenceError: Left side of assignment is not a reference. (Safari)
As listed by MDN Web Docs
Category
SyntaxError or ReferenceError, depending on the syntax
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.