?
u
m
/
yield
and await
are permitted as
let
await 0;
yield
or await
.
The syntax-directed operation StringValue takes no arguments and returns a String. It is defined piecewise over the following productions:
The result of evaluating an
In yield
may be used as an identifier. Evaluating the yield
as if it was an
When processing an instance of the production
the interpretation of
this
KeywordSee
false
, return true
, return An
Array elements may be elided at the beginning, middle or end of the element list. Whenever a comma in the element list is not preceded by an
The syntax-directed operation ArrayAccumulation takes arguments array (an Array) and nextIndex (an
An object initializer is an expression describing the initialization of an Object, written in a form resembling a literal. It is a list of zero or more pairs of
In certain contexts,
In addition to describing an actual object initializer the
This production exists so that
The
The syntax-directed operation IsComputedPropertyKey takes no arguments and returns a Boolean. It is defined piecewise over the following productions:
The syntax-directed operation PropertyNameList takes no arguments and returns a
The syntax-directed operation PropertyDefinitionEvaluation takes argument object and returns either a
See
See
See
See
See
See
The abstract operation IsValidRegularExpressionLiteral takes argument literal (a
g
, i
, m
, s
, u
, or y
, or if it contains the same code point more than once, return u
, let u be The syntax-directed operation TemplateStrings takes argument raw and returns a
The abstract operation GetTemplateObject takes argument templateLiteral (a
The creation of a template object cannot result in an
Each
Future editions of this specification may define additional non-enumerable properties of template objects.
The syntax-directed operation SubstitutionEvaluation takes no arguments and returns either a
The string conversion semantics applied to the String.prototype.concat
rather than the +
operator.
The string conversion semantics applied to the String.prototype.concat
rather than the +
operator.
The string conversion semantics applied to the String.prototype.concat
rather than the +
operator.
This algorithm does not apply delete
and typeof
may be applied to parenthesized expressions.
When processing an instance of the production
the interpretation of
This production exists in order to prevent automatic semicolon insertion rules (
a?.b
`c`
so that it would be interpreted as two valid statements. The purpose is to maintain consistency with similar code without optional chaining:
a.b
`c`
which is a valid statement and where automatic semicolon insertion does not apply.
Properties are accessed by name, using either the dot notation:
or the bracket notation:
The dot notation is explained by the following syntactic conversion:
is identical in its behaviour to
and similarly
is identical in its behaviour to
where <identifier-name-string> is the result of evaluating
The abstract operation EvaluatePropertyAccessWithExpressionKey takes arguments baseValue (an
The abstract operation EvaluatePropertyAccessWithIdentifierKey takes arguments baseValue (an
new
OperatorThe abstract operation EvaluateNew takes arguments constructExpr (a
A
The abstract operation EvaluateCall takes arguments func (an
super
KeywordThe abstract operation GetSuperConstructor takes no arguments and returns an
The abstract operation MakeSuperPropertyReference takes arguments actualThis, propertyKey, and strict and returns either a
The evaluation of an argument list produces a
The syntax-directed operation ArgumentListEvaluation takes no arguments and returns either a
?.
.The syntax-directed operation ChainEvaluation takes arguments baseValue and baseReference and returns either a
A tagged template is a function call where the arguments of the call are derived from a
The import.meta
.
An implementation of HostGetImportMetaProperties must conform to the following requirements:
The default implementation of HostGetImportMetaProperties is to return a new empty
The import.meta
.
Most
An implementation of HostFinalizeImportMeta must conform to the following requirements:
The default implementation of HostFinalizeImportMeta is to return
delete
Operator
It is a Syntax Error if the derived
and
The last rule means that expressions such as delete (((foo)))
produce
When a delete
operator occurs within delete
operator occurs within
The object that may be created in step
void
Operatortypeof
OperatorType of val | Result |
---|---|
Undefined |
|
Null |
|
Boolean |
|
Number |
|
String |
|
Symbol |
|
BigInt |
|
Object (does not implement [[Call]]) |
|
Object (implements [[Call]]) |
|
An additional entry related to [[IsHTMLDDA]] Internal Slot can be found in
+
OperatorThe unary + operator converts its operand to Number type.
-
OperatorThe unary -
operator converts its operand to Number type and then negates it. Negating
~
)!
)*
operator performs multiplication, producing the product of its operands./
operator performs division, producing the quotient of its operands.%
operator yields the remainder of its operands from an implied division.+
)The addition operator either performs string concatenation or numeric addition.
-
)The -
operator performs subtraction, producing the difference of its operands.
<<
)Performs a bitwise left shift operation on the left operand by the amount specified by the right operand.
<<
, >>
)Performs a sign-filling bitwise right shift operation on the left operand by the amount specified by the right operand.
>>
, >>>
)Performs a zero-filling bitwise right shift operation on the left operand by the amount specified by the right operand.
>>>
, The result of evaluating a relational operator is always of type Boolean, reflecting whether the relationship named by the operator holds between its two operands.
The [In] grammar parameter is needed to avoid confusing the in
operator in a relational expression with the in
operator in a for
statement.
The abstract operation InstanceofOperator takes arguments V (an
Steps instanceof
operator semantics. If an object does not define or inherit instanceof
semantics.
The result of evaluating an equality operator is always of type Boolean, reflecting whether the relationship named by the operator holds between its two operands.
Given the above definition of equality:
`${a}` == `${b}`
.
+a == +b
.
!a == !b
.
The equality operators maintain the following invariants:
A != B
is equivalent to !(A == B)
.
A == B
is equivalent to B == A
, except in the order of evaluation of A
and B
.
The equality operator is not always transitive. For example, there might be two distinct String objects, each representing the same String value; each String object would be considered equal to the String value by the ==
operator, but the two String objects would not be equal to each other. For example:
new String("a") == "a"
and "a" == new String("a")
are both new String("a") == new String("a")
is Comparison of Strings uses a simple equality test on sequences of code unit values. There is no attempt to use the more complex, semantically oriented definitions of character or string equality and collating order defined in the Unicode specification. Therefore Strings values that are canonically equal according to the Unicode Standard could test as unequal. In effect this algorithm assumes that both Strings are already in normalized form.
The value produced by a &&
or ||
operator is not necessarily of type Boolean. The value produced will always be the value of one of the two operand expressions.
? :
)The grammar for a
If
If
assignmentOpText | opText |
---|---|
**= | ** |
*= | * |
/= | / |
%= | % |
+= | + |
-= | - |
<<= | << |
>>= | >> |
>>>= | >>> |
&= | & |
^= | ^ |
|= | | |
When this expression occurs within
The abstract operation ApplyStringOrNumericBinaryOperator takes arguments lval (an **
, *
, /
, %
, +
, -
, <<
, >>
, >>>
, &
, ^
, or |
), and rval (an
+
, then**
, return ? /
, return ? %
, return ? >>>
, return ? opText | | operation |
---|---|---|
** | Number | |
* | Number | |
* | BigInt | |
/ | Number | |
% | Number | |
+ | Number | |
+ | BigInt | |
- | Number | |
- | BigInt | |
<< | Number | |
<< | BigInt | |
>> | Number | |
>> | BigInt | |
>>> | Number | |
& | Number | |
& | BigInt | |
^ | Number | |
^ | BigInt | |
| | Number | |
| | BigInt | |
No hint is provided in the calls to
Step
The abstract operation EvaluateStringOrNumericBinaryExpression takes arguments leftOperand (a
In certain circumstances when processing an instance of the production
the interpretation of
If
If
The syntax-directed operation DestructuringAssignmentEvaluation takes argument value and returns either a
The syntax-directed operation PropertyDestructuringAssignmentEvaluation takes argument value and returns either a
The syntax-directed operation RestDestructuringAssignmentEvaluation takes arguments value and excludedNames and returns either a
The syntax-directed operation IteratorDestructuringAssignmentEvaluation takes argument iteratorRecord and returns either a
Left to right evaluation order is maintained by evaluating a
The syntax-directed operation KeyedDestructuringAssignmentEvaluation takes arguments value and propertyName and returns either a
,
)