?um/p1-90`control이
eval function call은 모두 value 1을 반환합니다:
eval("1;;;;;")
eval("1;{}")
eval("1;var a;")
The abstract operation BlockDeclarationInstantiation takes arguments code (a
called될 때 다음 step을 수행합니다:
let, const, using 및 await using 선언은 실행 중인 실행 컨텍스트의 LexicalEnvironment로 스코프가 지정되는 변수를 정의한다. 변수는 이를 포함하는 let 선언의
생성식의 인스턴스를 처리할 때
The
정적 의미론 규칙은 이러한 형태의 const, using 또는 await using 선언에서 절대 발생하지 않도록 보장한다.
var statement는
The
The
The
It is defined piecewise over the following productions:
function 또는 class async function으로 start할 수 없습니다. 그렇게 하면 let [로 start할 수 없습니다. 그렇게 하면 first let
if Statementelse]는 classic “dangling else” problem을 usual way로 resolve합니다. 즉, associated if의 choice가 otherwise ambiguous할 때, else는 candidate if 중 nearest (innermost)에 associated됩니다이 rule은
The abstract operation LoopContinues takes arguments completion (a
The
do-while Statement이 rule은
The
while Statement이 rule은
The
for Statement이 rule은
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 Statements이 section은 Annex
이 rule은
The
이 section은 Annex
The
The
The
이 section은 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 method를 가진 throw 및 return method는 next method는 next method에 의해 processed되기 전에 deleted된 property는 ignored됩니다. enumeration 중에 target object에 새 property가 added되면, newly added property가 active enumeration에서 processed된다는 guarantee는 없습니다. next method에 의해 at most once returned됩니다.
target object의 property를 enumerating하는 것은 그 prototype의 property, 그 prototype의 prototype 등을 recursively enumerating하는 것을 include합니다; 그러나 prototype의 property는 같은 name을 가진 property가 next method에 의해 이미 processed되었으면 processed되지 않습니다. prototype object의 property가 이미 processed되었는지 determine할 때 [[Enumerable]] attribute의 value는 considered되지 않습니다. prototype object의 enumerable
추가로, obj도 그 prototype chain 안의 어떤 object도
ECMAScript implementation은
다음은 이러한 rule에 conform하는 ECMAScript generator function의 informative definition입니다:
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;
}
}
For-In Iterator는 어떤 specific object에 대한 specific iteration을 represent하는 object입니다. For-In Iterator object는 ECMAScript code에 의해 never directly accessible하지 않으며, 오직
The abstract operation CreateForInIterator takes argument obj (an Object) and returns a
%ForInIteratorPrototype% object:
| Internal Slot | Type | Description |
|---|---|---|
| [[Object]] | an Object | property가 iterated되고 있는 Object value입니다. |
| [[ObjectWasVisited]] | a Boolean |
|
| [[VisitedKeys]] |
a |
이 |
| [[RemainingKeys]] |
a |
그 prototype의 property를 iterating하기 전에(그 prototype이 |
continue Statementstatic initialization block boundary를 crossing하지 않고) break Statementstatic initialization block boundary를 crossing하지 않고) return Statementreturn statement는 function이 execution을 cease하게 하고, 대부분의 경우 caller에게 value를 return합니다. return statement가 actually caller에게 value를 return하지 않을 수도 있습니다. 예를 들어 try block 안에서, return statement의 finally block의 evaluation 중에 another
with Statement새 ECMAScript code에서는 with statement의 use가 discouraged됩니다.
with statement는 computed object에 대한
second rule은
control이 embedded
switch StatementThe
The abstract operation CaseClauseIsSelected takes arguments caseClauseNode (a
이 operation은 caseClauseNode의
control이
break 및 continue statement와 conjunction에서만 사용됩니다. ECMAScript에는 goto statement가 없습니다.
The abstract operation IsLabelledFunction takes argument stmt (a
The
LabelledEvaluation을 위한 special semantics를 가진
throw Statementtry Statementtry statement는 runtime error 또는 throw statement와 같은 exceptional condition이 occur할 수 있는 code block을 encloses합니다. catch clause는 exception-handling code를 제공합니다. catch clause가 exception을 catches하면, 그
The
control이
debugger Statement