Skip to content
JS
JavaScript error

SyntaxError

The JavaScript exception "function statement requires a name" occurs when there is a function statement in the code that requires a name.

Reference entryJavaScriptFetched
SyntaxError: Function statements require a function name (V8-based)
As listed by MDN Web Docs
SyntaxError: function statement requires a name (Firefox)
As listed by MDN Web Docs
SyntaxError: Function statements must have a name. (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.274Z.