Skip to content
JS
JavaScript error

SyntaxError

The JavaScript exception "continue must be inside loop" occurs when a continue statement is not inside a loop statement.

Reference entryJavaScriptFetched
SyntaxError: Illegal continue statement: no surrounding iteration statement (V8-based)
As listed by MDN Web Docs
SyntaxError: Illegal continue statement: 'label' does not denote an iteration statement (V8-based)
As listed by MDN Web Docs
SyntaxError: continue must be inside loop (Firefox)
As listed by MDN Web Docs
SyntaxError: 'continue' is only valid inside a loop statement. (Safari)
As listed by MDN Web Docs
SyntaxError: Cannot continue to the label 'label' as it is not targeting a loop. (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.