?uem/p1-90`It is a Syntax Error if the
No matter how control leaves the
The value of a eval
eval("1;;;;;")
eval("1;{}")
eval("1;var a;")
The abstract operation BlockDeclarationInstantiation takes arguments code (a
When a
It performs the following steps when called:
let, const, using, and await using declarations define variables that are scoped to the let declaration does not have an
When processing an instance of the production
the interpretation of
The
A const, using, or await using declaration.
A var statement declares variables that are scoped to the
If a
The
The
The
When
It is defined piecewise over the following productions:
An function or class async function because that would make it ambiguous with an let [ because that would make it ambiguous with a let
if Statementelse] resolves the classic “dangling else” problem in the usual way. That is, when the choice of associated if is otherwise ambiguous, the else is associated with the nearest (innermost) of the candidate ifsIt is only necessary to apply this rule if the extension specified in
The abstract operation LoopContinues takes arguments completion (a
Within the
The
do-while StatementIt is only necessary to apply this rule if the extension specified in
The
while StatementIt is only necessary to apply this rule if the extension specified in
The
for StatementIt is only necessary to apply this rule if the extension specified in
The
The abstract operation ForBodyEvaluation takes arguments test (an
The abstract operation CreatePerIterationEnvironment takes argument perIterationBindings (a
for-in, for-of, and for-await-of StatementsThis section is extended by Annex
It is only necessary to apply this rule if the extension specified in
The
This section is extended by Annex
The
The
The
This section is extended by Annex
The abstract operation ForIn/OfHeadEvaluation takes arguments uninitializedBoundNames (a
The abstract operation ForIn/OfBodyEvaluation takes arguments lhs (a
The abstract operation EnumerateObjectProperties takes argument obj (an Object) and returns an
next The throw and return next next next
Enumerating the properties of the target object includes enumerating properties of its next
In addition, if neither obj nor any object in its
ECMAScript implementations are not required to implement the algorithm in
The following is an informative definition of an ECMAScript generator
function* EnumerateObjectProperties(obj) {
const visited = new Set();
for (const key of Reflect.ownKeys(obj)) {
if (typeof key === "symbol") continue;
const desc = Reflect.getOwnPropertyDescriptor(obj, key);
if (desc) {
visited.add(key);
if (desc.enumerable) yield key;
}
}
const proto = Reflect.getPrototypeOf(obj);
if (proto === null) return;
for (const protoKey of EnumerateObjectProperties(proto)) {
if (!visited.has(protoKey)) yield protoKey;
}
}
A For-In Iterator is an object that represents a specific iteration over some specific object. For-In Iterator objects are never directly accessible to ECMAScript code; they exist solely to illustrate the behaviour of
The abstract operation CreateForInIterator takes argument obj (an Object) and returns a
The %ForInIteratorPrototype% object:
| Internal Slot | Type | Description |
|---|---|---|
| [[Object]] | an Object | The Object value whose properties are being iterated. |
| [[ObjectWasVisited]] | a Boolean |
|
| [[VisitedKeys]] |
a |
The values that have been emitted by this |
| [[RemainingKeys]] |
a |
The values remaining to be emitted for the current object, before iterating the properties of its |
continue Statementstatic initialization block boundaries), within an break Statementstatic initialization block boundaries), within an return StatementA return statement causes a return statement may not actually return a value to the caller depending on surrounding context. For example, in a try block, a return statement's finally block.
with StatementUse of the with statement is discouraged in new ECMAScript code. Consider alternatives that are permitted in both
The with statement adds an
It is only necessary to apply the second rule if the extension specified in
No matter how control leaves the embedded
switch StatementIt is a Syntax Error if the
The
The abstract operation CaseClauseIsSelected takes arguments caseClauseNode (a
This operation does not execute caseClauseNode's
No matter how control leaves the
A break and continue statements. ECMAScript has no goto statement. A
The abstract operation IsLabelledFunction takes argument stmt (a
The
A
The only two productions of
throw Statementtry StatementThe try statement encloses a block of code in which an exceptional condition can occur, such as a runtime error or a throw statement. The catch clause provides the exception-handling code. When a catch clause catches an exception, its
The
No matter how control leaves the
debugger StatementEvaluating a