ECMAScript® 2024 Language Specification

Draft ECMA-262 / February 15, 2024

14.8 The continue Statement

Syntax

ContinueStatement[Yield, Await] : continue ; continue [no LineTerminator here] LabelIdentifier[?Yield, ?Await] ;

14.8.1 Static Semantics: Early Errors

ContinueStatement : continue ; continue LabelIdentifier ;
  • It is a Syntax Error if this ContinueStatement is not nested, directly or indirectly (but not crossing function or static initialization block boundaries), within an IterationStatement.

14.8.2 Runtime Semantics: Evaluation

ContinueStatement : continue ;
  1. Return Completion Record { [[Type]]: continue, [[Value]]: empty, [[Target]]: empty }.
ContinueStatement : continue LabelIdentifier ;
  1. Let label be the StringValue of LabelIdentifier.
  2. Return Completion Record { [[Type]]: continue, [[Value]]: empty, [[Target]]: label }.