Files
ask262/spec-built/multipage/ecmascript-language-expressions.html
T

3689 lines
550 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en-GB-oxendict"><head><meta name="viewport" content="width=device-width, initial-scale=1"><meta charset="utf-8"><meta property="og:image" content="https://tc39.es/ecmarkup/ecma-logo.png"><meta property="og:title" content="ECMAScript® 2026 Language&nbsp;Specification"><meta property="og:description" content="Introduction
This Ecma Standard defines the ECMAScript 2026 Language. It is the seventeenth edition of the ECMAScript Language Specification. ECMAScript is based on several originating technologies, the most well-known being JavaScript (Netscape) and JScript (Microsoft). The language was invent">
<link rel="icon" href="../img/favicon.ico">
<link rel="stylesheet" href="../assets/css/ecmarkup.css"><link rel="stylesheet" href="../assets/css/print.css" media="print">
<title>ECMAScript® 2026 Language&nbsp;Specification</title><script src="../assets/js/multipage.js?cache=Wu2V1pj2" defer=""></script><script src="../assets/js/ecmarkup.js?cache=BPFBckdu" defer=""></script><link rel="canonical" href="../#sec-ecmascript-language-expressions"></head>
<body><div id="spec-container"><emu-clause id="sec-ecmascript-language-expressions">
<h1><span class="secnum">13</span> ECMAScript Language: Expressions</h1>
<emu-clause id="sec-identifiers">
<h1><span class="secnum">13.1</span> Identifiers</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="IdentifierReference" params="Yield, Await" id="prod-IdentifierReference">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bras6mo_" id="prod-dL7e73Zt">
<emu-nt id="_ref_20350"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt>
</emu-rhs>
<emu-rhs a="zobe2rzz" constraints="~Yield" id="prod-dN4C9Ooo"><emu-constraints>[~Yield]</emu-constraints>
<emu-t>yield</emu-t>
</emu-rhs>
<emu-rhs a="dypijsdc" constraints="~Await" id="prod-iAOJjaxZ"><emu-constraints>[~Await]</emu-constraints>
<emu-t>await</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" params="Yield, Await" id="prod-BindingIdentifier">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bras6mo_" id="prod-5vbjd2EY">
<emu-nt id="_ref_20351"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt>
</emu-rhs>
<emu-rhs a="0d8zyjn8" id="prod-bP3zkqsh">
<emu-t>yield</emu-t>
</emu-rhs>
<emu-rhs a="hx1dvlrw" id="prod-k8G1I2qF">
<emu-t>await</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" params="Yield, Await" id="prod-LabelIdentifier">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bras6mo_">
<emu-nt id="_ref_20352"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt>
</emu-rhs>
<emu-rhs a="zobe2rzz" constraints="~Yield" id="prod-aHP0cTnm"><emu-constraints>[~Yield]</emu-constraints>
<emu-t>yield</emu-t>
</emu-rhs>
<emu-rhs a="dypijsdc" constraints="~Await" id="prod-8xe5-4Uo"><emu-constraints>[~Await]</emu-constraints>
<emu-t>await</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="Identifier" id="prod-Identifier">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v6xddc2h" id="prod-OqjWNqf4">
<emu-nt id="_ref_20353"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> <emu-gmod>but not <emu-nt id="_ref_20354"><a href="ecmascript-language-lexical-grammar.html#prod-ReservedWord">ReservedWord</a></emu-nt></emu-gmod>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><code>yield</code> and <code>await</code> are permitted as <emu-nt id="_ref_20355"><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> in the grammar, and prohibited with <emu-xref href="#sec-static-semantic-rules" id="_ref_5951"><a href="notational-conventions.html#sec-static-semantic-rules">static semantics</a></emu-xref> below, to prohibit automatic semicolon insertion in cases such as</p>
<pre><code class="javascript hljs"><span class="hljs-keyword">let</span>
<span class="hljs-keyword">await</span> <span class="hljs-number">0</span>;</code></pre>
</div></emu-note>
<emu-clause id="sec-identifiers-static-semantics-early-errors">
<h1><span class="secnum">13.1.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bras6mo_"><emu-nt id="_ref_20356"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-xref aoid="IsStrict" id="_ref_5952"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this production) is <emu-val>true</emu-val> and the <emu-xref aoid="StringValue" id="_ref_5953"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20357"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> is either <emu-val>"arguments"</emu-val> or <emu-val>"eval"</emu-val>.
</li>
</ul>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0d8zyjn8"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0d8zyjn8"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LabelIdentifier">LabelIdentifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0d8zyjn8"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-xref aoid="IsStrict" id="_ref_5954"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this production) is <emu-val>true</emu-val>.
</li>
</ul>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hx1dvlrw"><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hx1dvlrw"><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LabelIdentifier">LabelIdentifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hx1dvlrw"><emu-t>await</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the <emu-xref href="#sec-context-free-grammars" id="_ref_5955"><a href="notational-conventions.html#sec-context-free-grammars">goal symbol</a></emu-xref> of the syntactic grammar is <emu-nt id="_ref_20358"><a href="ecmascript-language-scripts-and-modules.html#prod-Module">Module</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="BindingIdentifier" params="Yield, Await" collapsed="">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0d8zyjn8"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if this production has a <sub>[Yield]</sub> parameter.
</li>
</ul>
<emu-grammar><emu-production name="BindingIdentifier" params="Yield, Await" collapsed="">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hx1dvlrw"><emu-t>await</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if this production has an <sub>[Await]</sub> parameter.
</li>
</ul>
<emu-grammar><emu-production name="IdentifierReference" params="Yield, Await" collapsed="">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bras6mo_"><emu-nt id="_ref_20359"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" params="Yield, Await" collapsed="">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bras6mo_"><emu-nt id="_ref_20360"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" params="Yield, Await" collapsed="">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-LabelIdentifier">LabelIdentifier</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bras6mo_"><emu-nt id="_ref_20361"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if this production has a <sub>[Yield]</sub> parameter and the <emu-xref aoid="StringValue" id="_ref_5956"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20362"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> is <emu-val>"yield"</emu-val>.
</li>
<li>
It is a Syntax Error if this production has an <sub>[Await]</sub> parameter and the <emu-xref aoid="StringValue" id="_ref_5957"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20363"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> is <emu-val>"await"</emu-val>.
</li>
</ul>
<emu-grammar><emu-production name="Identifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v6xddc2h"><emu-nt id="_ref_20364"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> <emu-gmod>but not <emu-nt id="_ref_20365"><a href="ecmascript-language-lexical-grammar.html#prod-ReservedWord">ReservedWord</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-xref aoid="IsStrict" id="_ref_5958"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this phrase) is <emu-val>true</emu-val> and the <emu-xref aoid="StringValue" id="_ref_5959"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20366"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> is one of <emu-val>"implements"</emu-val>, <emu-val>"interface"</emu-val>, <emu-val>"let"</emu-val>, <emu-val>"package"</emu-val>, <emu-val>"private"</emu-val>, <emu-val>"protected"</emu-val>, <emu-val>"public"</emu-val>, <emu-val>"static"</emu-val>, or <emu-val>"yield"</emu-val>.
</li>
<li>
It is a Syntax Error if the <emu-xref href="#sec-context-free-grammars" id="_ref_5960"><a href="notational-conventions.html#sec-context-free-grammars">goal symbol</a></emu-xref> of the syntactic grammar is <emu-nt id="_ref_20367"><a href="ecmascript-language-scripts-and-modules.html#prod-Module">Module</a></emu-nt> and the <emu-xref aoid="StringValue" id="_ref_5961"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20368"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> is <emu-val>"await"</emu-val>.
</li>
<li>
It is a Syntax Error if the <emu-xref aoid="StringValue" id="_ref_5962"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20369"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> is the <emu-xref aoid="StringValue" id="_ref_5963"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of any <emu-nt id="_ref_20370"><a href="ecmascript-language-lexical-grammar.html#prod-ReservedWord">ReservedWord</a></emu-nt> except for <code>yield</code> or <code>await</code>.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <emu-xref aoid="StringValue" id="_ref_5964"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20371"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> normalizes any Unicode escape sequences in <emu-nt id="_ref_20372"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> hence such escapes cannot be used to write an <emu-nt id="_ref_20373"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> whose code point sequence is the same as a <emu-nt id="_ref_20374"><a href="ecmascript-language-lexical-grammar.html#prod-ReservedWord">ReservedWord</a></emu-nt>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-static-semantics-stringvalue" oldids="sec-identifiers-static-semantics-stringvalue,sec-identifier-names-static-semantics-stringvalue" type="sdo" aoid="StringValue"><span id="sec-identifier-names-static-semantics-stringvalue"></span><span id="sec-identifiers-static-semantics-stringvalue"></span>
<h1><span class="secnum">13.1.2</span> Static Semantics: StringValue</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_5965"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> StringValue takes no arguments and returns a String. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="IdentifierName" type="lexical">
<emu-nt><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> <emu-geq>::</emu-geq> <emu-rhs a="q0afq8g8" id="prod-RwRM8vDx">
<emu-nt id="_ref_20375"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierStart">IdentifierStart</a></emu-nt>
</emu-rhs>
<emu-rhs a="cawc7ktu" id="prod-NS6rHu2W">
<emu-nt id="_ref_20376"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
<emu-nt id="_ref_20377"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierPart">IdentifierPart</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>idTextUnescaped</var> be the <emu-xref aoid="IdentifierCodePoints" id="_ref_5966"><a href="ecmascript-language-lexical-grammar.html#sec-identifiercodepoints">IdentifierCodePoints</a></emu-xref> of <emu-nt id="_ref_20378"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>.</li><li>Return <emu-xref aoid="CodePointsToString" id="_ref_5967"><a href="ecmascript-language-source-code.html#sec-codepointstostring">CodePointsToString</a></emu-xref>(<var>idTextUnescaped</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0d8zyjn8" id="prod-TEe-WTI-"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0d8zyjn8" id="prod-ZpP1WoNY"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LabelIdentifier">LabelIdentifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0d8zyjn8" id="prod-APZnd9XH"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return <emu-val>"yield"</emu-val>.</li></ol></emu-alg>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hx1dvlrw" id="prod-ov5ki9Up"><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="BindingIdentifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hx1dvlrw" id="prod-fu2iq4OH"><emu-t>await</emu-t></emu-rhs>
</emu-production>
<emu-production name="LabelIdentifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LabelIdentifier">LabelIdentifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hx1dvlrw" id="prod-z0WsNljd"><emu-t>await</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return <emu-val>"await"</emu-val>.</li></ol></emu-alg>
<emu-grammar><emu-production name="Identifier" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v6xddc2h" id="prod-3LDrFiW5"><emu-nt id="_ref_20379"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> <emu-gmod>but not <emu-nt id="_ref_20380"><a href="ecmascript-language-lexical-grammar.html#prod-ReservedWord">ReservedWord</a></emu-nt></emu-gmod></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return the <emu-xref aoid="StringValue" id="_ref_5968"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20381"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>.</li></ol></emu-alg>
<emu-grammar><emu-production name="PrivateIdentifier" type="lexical">
<emu-nt><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt> <emu-geq>::</emu-geq> <emu-rhs a="echyiakf" id="prod-nzu557qc">
<emu-t>#</emu-t>
<emu-nt id="_ref_20382"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return the <emu-xref href="#string-concatenation" id="_ref_5969"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of 0x0023 (NUMBER SIGN) and the <emu-xref aoid="StringValue" id="_ref_5970"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20383"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ModuleExportName" collapsed="">
<emu-nt><a href="ecmascript-language-scripts-and-modules.html#prod-ModuleExportName">ModuleExportName</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="xhtltz00" id="prod-Vk-n5Kcs"><emu-nt id="_ref_20384"><a href="ecmascript-language-lexical-grammar.html#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return the <emu-xref aoid="SV" id="_ref_5971"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-sv">SV</a></emu-xref> of <emu-nt id="_ref_20385"><a href="ecmascript-language-lexical-grammar.html#prod-StringLiteral">StringLiteral</a></emu-nt>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-identifiers-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.1.3</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bras6mo_" id="prod-12IVipzn"><emu-nt id="_ref_20386"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_5972"><a href="executable-code-and-execution-contexts.html#sec-resolvebinding" class="e-user-code">ResolveBinding</a></emu-xref>(<emu-xref aoid="StringValue" id="_ref_5973"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20387"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt>).</li></ol></emu-alg>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0d8zyjn8" id="prod-MHlI0_J2"><emu-t>yield</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_5974"><a href="executable-code-and-execution-contexts.html#sec-resolvebinding" class="e-user-code">ResolveBinding</a></emu-xref>(<emu-val>"yield"</emu-val>).</li></ol></emu-alg>
<emu-grammar><emu-production name="IdentifierReference" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hx1dvlrw" id="prod-7dhF3jkA"><emu-t>await</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_5975"><a href="executable-code-and-execution-contexts.html#sec-resolvebinding" class="e-user-code">ResolveBinding</a></emu-xref>(<emu-val>"await"</emu-val>).</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The result of evaluating an <emu-nt id="_ref_20388"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> is always a value of type Reference.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>In <emu-xref href="#non-strict-code" id="_ref_5976"><a href="ecmascript-language-source-code.html#non-strict-code">non-strict code</a></emu-xref>, the <emu-xref href="#sec-keywords-and-reserved-words" id="_ref_5977"><a href="ecmascript-language-lexical-grammar.html#sec-keywords-and-reserved-words">keyword</a></emu-xref> <code>yield</code> may be used as an identifier. Evaluating the <emu-nt id="_ref_20389"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> resolves the binding of <code>yield</code> as if it was an <emu-nt id="_ref_20390"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt>. Early Error restriction ensures that such an evaluation only can occur for <emu-xref href="#non-strict-code" id="_ref_5978"><a href="ecmascript-language-source-code.html#non-strict-code">non-strict code</a></emu-xref>.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-primary-expression">
<h1><span class="secnum">13.2</span> Primary Expression</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="PrimaryExpression" params="Yield, Await" id="prod-PrimaryExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="jo4mwtvh" id="prod-6iVAqhjf">
<emu-t>this</emu-t>
</emu-rhs>
<emu-rhs a="dlsgch-w" id="prod-Qw-BmNvs">
<emu-nt params="?Yield, ?Await" id="_ref_20391"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="kul-a19e" id="prod-Sla8Mecg">
<emu-nt id="_ref_20392"><a href="ecmascript-language-expressions.html#prod-Literal">Literal</a></emu-nt>
</emu-rhs>
<emu-rhs a="l8_i0ob3" id="prod-Caejwk3t">
<emu-nt params="?Yield, ?Await" id="_ref_20393"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="7pishiof" id="prod-4t3kIOlY">
<emu-nt params="?Yield, ?Await" id="_ref_20394"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="jc7szv1s" id="prod-SoPEL49Y">
<emu-nt id="_ref_20395"><a href="ecmascript-language-functions-and-classes.html#prod-FunctionExpression">FunctionExpression</a></emu-nt>
</emu-rhs>
<emu-rhs a="jqir3v1i" id="prod-Je5YcOXI">
<emu-nt params="?Yield, ?Await" id="_ref_20396"><a href="ecmascript-language-functions-and-classes.html#prod-ClassExpression">ClassExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="q7f39ayg" id="prod-1wa_TGAR">
<emu-nt id="_ref_20397"><a href="ecmascript-language-functions-and-classes.html#prod-GeneratorExpression">GeneratorExpression</a></emu-nt>
</emu-rhs>
<emu-rhs a="rvibtigb" id="prod-D7ySJoLP">
<emu-nt id="_ref_20398"><a href="ecmascript-language-functions-and-classes.html#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt>
</emu-rhs>
<emu-rhs a="naptrn97" id="prod-4BCWI5RW">
<emu-nt id="_ref_20399"><a href="ecmascript-language-functions-and-classes.html#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt>
</emu-rhs>
<emu-rhs a="mbzy6lvr" id="prod-rfJuuLNW">
<emu-nt id="_ref_20400"><a href="ecmascript-language-lexical-grammar.html#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>
</emu-rhs>
<emu-rhs a="stpbjyob" id="prod-iJnRUrcY">
<emu-nt params="?Yield, ?Await, ~Tagged" id="_ref_20401"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, ~Tagged]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="parencover" id="prod-INZ21P3A">
<emu-nt params="?Yield, ?Await" id="_ref_20402"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="CoverParenthesizedExpressionAndArrowParameterList" params="Yield, Await" id="prod-CoverParenthesizedExpressionAndArrowParameterList">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ed6ncho6">
<emu-t>(</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20403"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>)</emu-t>
</emu-rhs>
<emu-rhs a="lyzvfyfb">
<emu-t>(</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20404"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-t>)</emu-t>
</emu-rhs>
<emu-rhs a="eormm5tk">
<emu-t>(</emu-t>
<emu-t>)</emu-t>
</emu-rhs>
<emu-rhs a="pirlsxzm">
<emu-t>(</emu-t>
<emu-t>...</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20405"><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>)</emu-t>
</emu-rhs>
<emu-rhs a="swpbyn40">
<emu-t>(</emu-t>
<emu-t>...</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20406"><a href="ecmascript-language-statements-and-declarations.html#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>)</emu-t>
</emu-rhs>
<emu-rhs a="21pbm2tg">
<emu-t>(</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20407"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-t>...</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20408"><a href="ecmascript-language-expressions.html#prod-BindingIdentifier">BindingIdentifier</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>)</emu-t>
</emu-rhs>
<emu-rhs a="qoyfpol8">
<emu-t>(</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20409"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-t>...</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20410"><a href="ecmascript-language-statements-and-declarations.html#prod-BindingPattern">BindingPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>)</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<h2>Supplemental Syntax</h2>
<p>
When processing an instance of the production<br>
<emu-grammar><emu-production name="PrimaryExpression" params="Yield, Await" collapsed="" class=" inline">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="kcra71qq"><emu-nt params="?Yield, ?Await" id="_ref_20411"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
</emu-grammar><br>
the interpretation of <emu-nt id="_ref_20412"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> is refined using the following grammar:
</p>
<emu-grammar type="definition"><emu-production name="ParenthesizedExpression" params="Yield, Await" id="prod-ParenthesizedExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ParenthesizedExpression">ParenthesizedExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ed6ncho6" id="prod-m5AWMC3P">
<emu-t>(</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20413"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>)</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-this-keyword">
<h1><span class="secnum">13.2.1</span> The <code>this</code> Keyword</h1>
<emu-clause id="sec-this-keyword-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.2.1.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="jo4mwtvh" id="prod-P91j5SRi"><emu-t>this</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ResolveThisBinding" id="_ref_5979"><a href="executable-code-and-execution-contexts.html#sec-resolvethisbinding">ResolveThisBinding</a></emu-xref>().</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-identifier-reference">
<h1><span class="secnum">13.2.2</span> Identifier Reference</h1>
<p>See <emu-xref href="#sec-identifiers" id="_ref_399"><a href="ecmascript-language-expressions.html#sec-identifiers">13.1</a></emu-xref> for <emu-nt id="_ref_20414"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt>.</p>
</emu-clause>
<emu-clause id="sec-primary-expression-literals">
<h1><span class="secnum">13.2.3</span> Literals</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Literal" id="prod-Literal">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Literal">Literal</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vphbieby" id="prod-3wWoyoyk">
<emu-nt id="_ref_20415"><a href="ecmascript-language-lexical-grammar.html#prod-NullLiteral">NullLiteral</a></emu-nt>
</emu-rhs>
<emu-rhs a="nqjh_sxl" id="prod-T8-D_rlw">
<emu-nt id="_ref_20416"><a href="ecmascript-language-lexical-grammar.html#prod-BooleanLiteral">BooleanLiteral</a></emu-nt>
</emu-rhs>
<emu-rhs a="pui0b1rt" id="prod-qwQbursv">
<emu-nt id="_ref_20417"><a href="ecmascript-language-lexical-grammar.html#prod-NumericLiteral">NumericLiteral</a></emu-nt>
</emu-rhs>
<emu-rhs a="xhtltz00" id="prod-JuPoYov6">
<emu-nt id="_ref_20418"><a href="ecmascript-language-lexical-grammar.html#prod-StringLiteral">StringLiteral</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-literals-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.2.3.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="Literal" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Literal">Literal</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vphbieby" id="prod-5gR2ZD66"><emu-nt id="_ref_20419"><a href="ecmascript-language-lexical-grammar.html#prod-NullLiteral">NullLiteral</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return <emu-val>null</emu-val>.</li></ol></emu-alg>
<emu-grammar><emu-production name="Literal" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Literal">Literal</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="nqjh_sxl" id="prod-phcGo5D8"><emu-nt id="_ref_20420"><a href="ecmascript-language-lexical-grammar.html#prod-BooleanLiteral">BooleanLiteral</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_20421"><a href="ecmascript-language-lexical-grammar.html#prod-BooleanLiteral">BooleanLiteral</a></emu-nt> is the token <code>false</code>, return <emu-val>false</emu-val>.</li><li>If <emu-nt id="_ref_20422"><a href="ecmascript-language-lexical-grammar.html#prod-BooleanLiteral">BooleanLiteral</a></emu-nt> is the token <code>true</code>, return <emu-val>true</emu-val>.</li></ol></emu-alg>
<emu-grammar><emu-production name="Literal" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Literal">Literal</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="pui0b1rt" id="prod-JJ6LucaR"><emu-nt id="_ref_20423"><a href="ecmascript-language-lexical-grammar.html#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return the <emu-xref aoid="NumericValue" id="_ref_5980"><a href="ecmascript-language-lexical-grammar.html#sec-numericvalue">NumericValue</a></emu-xref> of <emu-nt id="_ref_20424"><a href="ecmascript-language-lexical-grammar.html#prod-NumericLiteral">NumericLiteral</a></emu-nt> as defined in <emu-xref href="#sec-literals-numeric-literals" id="_ref_400"><a href="ecmascript-language-lexical-grammar.html#sec-literals-numeric-literals">12.9.3</a></emu-xref>.</li></ol></emu-alg>
<emu-grammar><emu-production name="Literal" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Literal">Literal</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="xhtltz00" id="prod-JaYVP4rC"><emu-nt id="_ref_20425"><a href="ecmascript-language-lexical-grammar.html#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return the <emu-xref aoid="SV" id="_ref_5981"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-sv">SV</a></emu-xref> of <emu-nt id="_ref_20426"><a href="ecmascript-language-lexical-grammar.html#prod-StringLiteral">StringLiteral</a></emu-nt> as defined in <emu-xref href="#sec-static-semantics-sv" id="_ref_401"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-sv">12.9.4.2</a></emu-xref>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-array-initializer">
<h1><span class="secnum">13.2.4</span> Array Initializer</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>An <emu-nt id="_ref_20427"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> is an expression describing the initialization of an Array, using a list, of zero or more expressions each of which represents an array element, enclosed in square brackets. The elements need not be literals; they are evaluated each time the array initializer is evaluated.</p>
</div></emu-note>
<p>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 <emu-nt id="_ref_20428"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> (i.e., a comma at the beginning or after another comma), the missing array element contributes to the length of the Array and increases the index of subsequent elements. Elided array elements are not defined. If an element is elided at the end of an array, that element does not contribute to the length of the Array.</p>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ArrayLiteral" params="Yield, Await" id="prod-ArrayLiteral">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="kg5ha7xc" id="prod-oN6pjX9m">
<emu-t>[</emu-t>
<emu-nt optional="" id="_ref_20429"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
<emu-rhs a="xwviorlp" id="prod-Y8wRJ4om">
<emu-t>[</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20430"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
<emu-rhs a="flt40tbt" id="prod-je9iGq8a">
<emu-t>[</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20431"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt optional="" id="_ref_20432"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="ElementList" params="Yield, Await" id="prod-ElementList">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="mg86fhyo" id="prod-nakNeXAG">
<emu-nt optional="" id="_ref_20433"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20434"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="bzoasbwv" id="prod-XL4uSEt_">
<emu-nt optional="" id="_ref_20435"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20436"><a href="ecmascript-language-expressions.html#prod-SpreadElement">SpreadElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="6ukoiilh" id="prod-rNLR62Va">
<emu-nt params="?Yield, ?Await" id="_ref_20437"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt optional="" id="_ref_20438"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20439"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="nnao2vfk" id="prod-BSaguLF3">
<emu-nt params="?Yield, ?Await" id="_ref_20440"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt optional="" id="_ref_20441"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20442"><a href="ecmascript-language-expressions.html#prod-SpreadElement">SpreadElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="Elision" id="prod-Elision">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="lhh3u7f7" id="prod-UVeRCADp">
<emu-t>,</emu-t>
</emu-rhs>
<emu-rhs a="gg0bjle3" id="prod-lq_Nojbr">
<emu-nt id="_ref_20443"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt>
<emu-t>,</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="SpreadElement" params="Yield, Await" id="prod-SpreadElement">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-SpreadElement">SpreadElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="tio0yijn" id="prod-H9W06sct">
<emu-t>...</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20444"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-runtime-semantics-arrayaccumulation" oldids="sec-static-semantics-elisionwidth" type="sdo" aoid="ArrayAccumulation"><span id="sec-static-semantics-elisionwidth"></span>
<h1><span class="secnum">13.2.4.1</span> Runtime Semantics: ArrayAccumulation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_5982"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> ArrayAccumulation takes arguments <var>array</var> (an Array) and <var>nextIndex</var> (an <emu-xref href="#integer" id="_ref_5983"><a href="notational-conventions.html#integer">integer</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_5984"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> an <emu-xref href="#integer" id="_ref_5985"><a href="notational-conventions.html#integer">integer</a></emu-xref> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_5986"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="Elision" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="lhh3u7f7" id="prod-ACq7eTCD"><emu-t>,</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>len</var> be <var>nextIndex</var> + 1.</li><li>Perform ?&nbsp;<emu-xref aoid="Set" id="_ref_5987"><a href="abstract-operations.html#sec-set-o-p-v-throw" class="e-user-code">Set</a></emu-xref>(<var>array</var>, <emu-val>"length"</emu-val>, <emu-xref aoid="𝔽" id="_ref_5988"><a href="notational-conventions.html#%F0%9D%94%BD">𝔽</a></emu-xref>(<var>len</var>), <emu-val>true</emu-val>).</li><li>NOTE: The above step throws if <var>len</var> exceeds 2<sup>32</sup> - 1.</li><li>Return <var>len</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="Elision" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gg0bjle3" id="prod-KyZNZ-MT">
<emu-nt id="_ref_20445"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt>
<emu-t>,</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_5989"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20446"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with arguments <var>array</var> and (<var>nextIndex</var> + 1).</li></ol></emu-alg>
<emu-grammar><emu-production name="ElementList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="2aa1epou" id="prod-_juTnZH7">
<emu-nt optional="" id="_ref_20447"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt id="_ref_20448"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_20449"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Set <var>nextIndex</var> to ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_5990"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20450"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li></ol></li><li>Let <var>initResult</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_5991"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20451"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>initValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_5992"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>initResult</var>).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_5993"><a href="abstract-operations.html#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>array</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_5994"><a href="abstract-operations.html#sec-tostring">ToString</a></emu-xref>(<emu-xref aoid="𝔽" id="_ref_5995"><a href="notational-conventions.html#%F0%9D%94%BD">𝔽</a></emu-xref>(<var>nextIndex</var>)), <var>initValue</var>).</li><li>Return <var>nextIndex</var> + 1.</li></ol></emu-alg>
<emu-grammar><emu-production name="ElementList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="fbpz0ate" id="prod-PNKSiljq">
<emu-nt optional="" id="_ref_20452"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt id="_ref_20453"><a href="ecmascript-language-expressions.html#prod-SpreadElement">SpreadElement</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_20454"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Set <var>nextIndex</var> to ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_5996"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20455"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_5997"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20456"><a href="ecmascript-language-expressions.html#prod-SpreadElement">SpreadElement</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ElementList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="_sr5sq6t" id="prod-9ZiZA1Ch">
<emu-nt id="_ref_20457"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt optional="" id="_ref_20458"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt id="_ref_20459"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Set <var>nextIndex</var> to ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_5998"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20460"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li><li>If <emu-nt id="_ref_20461"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Set <var>nextIndex</var> to ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_5999"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20462"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li></ol></li><li>Let <var>initResult</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6000"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20463"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>initValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6001"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>initResult</var>).</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6002"><a href="abstract-operations.html#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>array</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6003"><a href="abstract-operations.html#sec-tostring">ToString</a></emu-xref>(<emu-xref aoid="𝔽" id="_ref_6004"><a href="notational-conventions.html#%F0%9D%94%BD">𝔽</a></emu-xref>(<var>nextIndex</var>)), <var>initValue</var>).</li><li>Return <var>nextIndex</var> + 1.</li></ol></emu-alg>
<emu-grammar><emu-production name="ElementList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="aleaauxs" id="prod-HRfw0EOP">
<emu-nt id="_ref_20464"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt optional="" id="_ref_20465"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt id="_ref_20466"><a href="ecmascript-language-expressions.html#prod-SpreadElement">SpreadElement</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Set <var>nextIndex</var> to ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_6005"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20467"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li><li>If <emu-nt id="_ref_20468"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Set <var>nextIndex</var> to ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_6006"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20469"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_6007"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20470"><a href="ecmascript-language-expressions.html#prod-SpreadElement">SpreadElement</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="SpreadElement" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-SpreadElement">SpreadElement</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="w7ifpmpd" id="prod-_w8Sn596">
<emu-t>...</emu-t>
<emu-nt id="_ref_20471"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>spreadRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6008"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20472"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>spreadObj</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6009"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>spreadRef</var>).</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6010"><a href="abstract-operations.html#sec-getiterator" class="e-user-code">GetIterator</a></emu-xref>(<var>spreadObj</var>, <emu-const>sync</emu-const>).</li><li>Repeat,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStepValue" id="_ref_6011"><a href="abstract-operations.html#sec-iteratorstepvalue" class="e-user-code">IteratorStepValue</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-const>done</emu-const>, return <var>nextIndex</var>.</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6012"><a href="abstract-operations.html#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>array</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6013"><a href="abstract-operations.html#sec-tostring">ToString</a></emu-xref>(<emu-xref aoid="𝔽" id="_ref_6014"><a href="notational-conventions.html#%F0%9D%94%BD">𝔽</a></emu-xref>(<var>nextIndex</var>)), <var>next</var>).</li><li>Set <var>nextIndex</var> to <var>nextIndex</var> + 1.</li></ol></li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6015"><a href="abstract-operations.html#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref> is used to ensure that own properties are defined for the array even if the standard built-in <emu-xref href="#sec-properties-of-the-array-prototype-object" id="_ref_6016"><a href="indexed-collections.html#sec-properties-of-the-array-prototype-object">Array prototype object</a></emu-xref> has been modified in a manner that would preclude the creation of new own properties using <var class="field">[[Set]]</var>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-array-initializer-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.2.4.2</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ArrayLiteral" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="kg5ha7xc" id="prod-8EXlViH4">
<emu-t>[</emu-t>
<emu-nt optional="" id="_ref_20473"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>array</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6017"><a href="ordinary-and-exotic-objects-behaviours.html#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>If <emu-nt id="_ref_20474"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Perform ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_6018"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20475"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with arguments <var>array</var> and 0.</li></ol></li><li>Return <var>array</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayLiteral" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="cqjjuksr" id="prod-58ym50AN">
<emu-t>[</emu-t>
<emu-nt id="_ref_20476"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>array</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6019"><a href="ordinary-and-exotic-objects-behaviours.html#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Perform ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_6020"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20477"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt> with arguments <var>array</var> and 0.</li><li>Return <var>array</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayLiteral" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="yjc94a7j" id="prod-f05iKqYb">
<emu-t>[</emu-t>
<emu-nt id="_ref_20478"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt optional="" id="_ref_20479"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>array</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6021"><a href="ordinary-and-exotic-objects-behaviours.html#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>nextIndex</var> be ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_6022"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20480"><a href="ecmascript-language-expressions.html#prod-ElementList">ElementList</a></emu-nt> with arguments <var>array</var> and 0.</li><li>If <emu-nt id="_ref_20481"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Perform ?&nbsp;<emu-xref aoid="ArrayAccumulation" id="_ref_6023"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-arrayaccumulation" class="e-user-code">ArrayAccumulation</a></emu-xref> of <emu-nt id="_ref_20482"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with arguments <var>array</var> and <var>nextIndex</var>.</li></ol></li><li>Return <var>array</var>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-object-initializer">
<h1><span class="secnum">13.2.5</span> Object Initializer</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>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 <emu-xref href="#property-key" id="_ref_6024"><a href="ecmascript-data-types-and-values.html#property-key">property keys</a></emu-xref> and associated values, enclosed in curly brackets. The values need not be literals; they are evaluated each time the object initializer is evaluated.</p>
</div></emu-note>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ObjectLiteral" params="Yield, Await" id="prod-ObjectLiteral">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gbpaspne" id="prod-4iBxhmtp">
<emu-t>{</emu-t>
<emu-t>}</emu-t>
</emu-rhs>
<emu-rhs a="qgbbf6iu" id="prod-tbtFUUOH">
<emu-t>{</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20483"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
<emu-rhs a="bzhfnkx-" id="prod-k6AQl_P9">
<emu-t>{</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20484"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="PropertyDefinitionList" params="Yield, Await" id="prod-PropertyDefinitionList">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="m0tgtrnc" id="prod-BIN60s98">
<emu-nt params="?Yield, ?Await" id="_ref_20485"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="r9tpew-z" id="prod-c72dXkTz">
<emu-nt params="?Yield, ?Await" id="_ref_20486"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20487"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="PropertyDefinition" params="Yield, Await" id="prod-PropertyDefinition">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="dlsgch-w" id="prod-_kSpAuMA">
<emu-nt params="?Yield, ?Await" id="_ref_20488"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="apwscjmv">
<emu-nt params="?Yield, ?Await" id="_ref_20489"><a href="ecmascript-language-expressions.html#prod-CoverInitializedName">CoverInitializedName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="5zrjcx_s" id="prod-Jsxupyj1">
<emu-nt params="?Yield, ?Await" id="_ref_20490"><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>:</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20491"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="ke2_9p84" id="prod-mDvkFMKq">
<emu-nt params="?Yield, ?Await" id="_ref_20492"><a href="ecmascript-language-functions-and-classes.html#prod-MethodDefinition">MethodDefinition</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="tio0yijn" id="prod-vZMKiSRJ">
<emu-t>...</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20493"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="PropertyName" params="Yield, Await" id="prod-PropertyName">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="5x4jbee2" id="prod-0EhkgOcT">
<emu-nt id="_ref_20494"><a href="ecmascript-language-expressions.html#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt>
</emu-rhs>
<emu-rhs a="x0s2x3xm" id="prod-vr_cfE7P">
<emu-nt params="?Yield, ?Await" id="_ref_20495"><a href="ecmascript-language-expressions.html#prod-ComputedPropertyName">ComputedPropertyName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="LiteralPropertyName" id="prod-LiteralPropertyName">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="drsx4tka" id="prod-j68LXthC">
<emu-nt id="_ref_20496"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
<emu-rhs a="xhtltz00" id="prod-ueikIsNm">
<emu-nt id="_ref_20497"><a href="ecmascript-language-lexical-grammar.html#prod-StringLiteral">StringLiteral</a></emu-nt>
</emu-rhs>
<emu-rhs a="pui0b1rt" id="prod-6-SoljXV">
<emu-nt id="_ref_20498"><a href="ecmascript-language-lexical-grammar.html#prod-NumericLiteral">NumericLiteral</a></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="ComputedPropertyName" params="Yield, Await" id="prod-ComputedPropertyName">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ComputedPropertyName">ComputedPropertyName</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="48_35zgr" id="prod-V7gahr3e">
<emu-t>[</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20499"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="CoverInitializedName" params="Yield, Await" id="prod-CoverInitializedName">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-CoverInitializedName">CoverInitializedName</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hcdz_xlp">
<emu-nt params="?Yield, ?Await" id="_ref_20500"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20501"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="Initializer" params="In, Yield, Await" id="prod-Initializer">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="3gfs5awf" id="prod-P2DNnhoV">
<emu-t>=</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_20502"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p><emu-nt id="_ref_20503"><a href="ecmascript-language-functions-and-classes.html#prod-MethodDefinition">MethodDefinition</a></emu-nt> is defined in <emu-xref href="#sec-method-definitions" id="_ref_402"><a href="ecmascript-language-functions-and-classes.html#sec-method-definitions">15.4</a></emu-xref>.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>In certain contexts, <emu-nt id="_ref_20504"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> is used as a cover grammar for a more restricted secondary grammar. The <emu-nt id="_ref_20505"><a href="ecmascript-language-expressions.html#prod-CoverInitializedName">CoverInitializedName</a></emu-nt> production is necessary to fully cover these secondary grammars. However, use of this production results in an early Syntax Error in normal contexts where an actual <emu-nt id="_ref_20506"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> is expected.</p>
</div></emu-note>
<emu-clause id="sec-object-initializer-static-semantics-early-errors" oldids="sec-__proto__-property-names-in-object-initializers"><span id="sec-__proto__-property-names-in-object-initializers"></span>
<h1><span class="secnum">13.2.5.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="s8ilfl9g"><emu-nt id="_ref_20507"><a href="ecmascript-language-functions-and-classes.html#prod-MethodDefinition">MethodDefinition</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-xref aoid="HasDirectSuper" id="_ref_6025"><a href="ecmascript-language-functions-and-classes.html#sec-static-semantics-hasdirectsuper">HasDirectSuper</a></emu-xref> of <emu-nt id="_ref_20508"><a href="ecmascript-language-functions-and-classes.html#prod-MethodDefinition">MethodDefinition</a></emu-nt> is <emu-val>true</emu-val>.
</li>
<li>
It is a Syntax Error if the <emu-xref aoid="PrivateBoundIdentifiers" id="_ref_6026"><a href="ecmascript-language-functions-and-classes.html#sec-static-semantics-privateboundidentifiers">PrivateBoundIdentifiers</a></emu-xref> of <emu-nt id="_ref_20509"><a href="ecmascript-language-functions-and-classes.html#prod-MethodDefinition">MethodDefinition</a></emu-nt> is not empty.
</li>
</ul>
<p>In addition to describing an actual object initializer the <emu-nt id="_ref_20510"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> productions are also used as a cover grammar for <emu-nt id="_ref_20511"><a href="ecmascript-language-expressions.html#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt> and may be recognized as part of a <emu-nt id="_ref_20512"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>. When <emu-nt id="_ref_20513"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> appears in a context where <emu-nt id="_ref_20514"><a href="ecmascript-language-expressions.html#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt> is required the following Early Error rules are <b>not</b> applied. In addition, they are not applied when initially parsing a <emu-nt id="_ref_20515"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> or <emu-nt id="_ref_20516"><a href="ecmascript-language-functions-and-classes.html#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</p>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="3wg6qczf"><emu-nt id="_ref_20517"><a href="ecmascript-language-expressions.html#prod-CoverInitializedName">CoverInitializedName</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if any source text is matched by this production.
</li>
</ul>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>This production exists so that <emu-nt id="_ref_20518"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> can serve as a cover grammar for <emu-nt id="_ref_20519"><a href="ecmascript-language-expressions.html#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt>. It cannot occur in an actual object initializer.</p>
</div></emu-note>
<emu-grammar><emu-production name="ObjectLiteral">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="g--o073w">
<emu-t>{</emu-t>
<emu-nt id="_ref_20520"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
<emu-rhs a="hwnsf_iz">
<emu-t>{</emu-t>
<emu-nt id="_ref_20521"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt>
<emu-t>,</emu-t>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the <emu-xref aoid="PropertyNameList" id="_ref_6027"><a href="ecmascript-language-expressions.html#sec-static-semantics-propertynamelist">PropertyNameList</a></emu-xref> of <emu-nt id="_ref_20522"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt> contains any duplicate entries for <emu-val>"__proto__"</emu-val> and at least two of those entries were obtained from productions of the form <emu-grammar><emu-production name="PropertyDefinition" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="8tkldtak">
<emu-nt id="_ref_20523"><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a></emu-nt>
<emu-t>:</emu-t>
<emu-nt id="_ref_20524"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>. This rule is not applied if this <emu-nt id="_ref_20525"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> is contained within a <emu-nt id="_ref_20526"><a href="ecmascript-language-scripts-and-modules.html#prod-Script">Script</a></emu-nt> that is being parsed for <emu-xref aoid="ParseJSON" id="_ref_6028"><a href="structured-data.html#sec-ParseJSON">ParseJSON</a></emu-xref> (see step <emu-xref href="#step-json-parse-parse" id="_ref_403"><a href="structured-data.html#step-json-parse-parse">3</a></emu-xref> of <emu-xref aoid="ParseJSON" id="_ref_6029"><a href="structured-data.html#sec-ParseJSON">ParseJSON</a></emu-xref>).
</li>
</ul>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6030"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> returned by <emu-xref aoid="PropertyNameList" id="_ref_6031"><a href="ecmascript-language-expressions.html#sec-static-semantics-propertynamelist">PropertyNameList</a></emu-xref> does not include <emu-xref href="#property-name" id="_ref_6032"><a href="ecmascript-data-types-and-values.html#property-name">property names</a></emu-xref> defined using a <emu-nt id="_ref_20527"><a href="ecmascript-language-expressions.html#prod-ComputedPropertyName">ComputedPropertyName</a></emu-nt>.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-static-semantics-iscomputedpropertykey" type="sdo" aoid="IsComputedPropertyKey">
<h1><span class="secnum">13.2.5.2</span> Static Semantics: IsComputedPropertyKey</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6033"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> IsComputedPropertyKey takes no arguments and returns a Boolean. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="PropertyName" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="5x4jbee2" id="prod-SPDqK5VR"><emu-nt id="_ref_20528"><a href="ecmascript-language-expressions.html#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return <emu-val>false</emu-val>.</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyName" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="nimmmso5" id="prod-SOs-1o2b"><emu-nt id="_ref_20529"><a href="ecmascript-language-expressions.html#prod-ComputedPropertyName">ComputedPropertyName</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return <emu-val>true</emu-val>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-static-semantics-propertynamelist" type="sdo" aoid="PropertyNameList">
<h1><span class="secnum">13.2.5.3</span> Static Semantics: PropertyNameList</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6034"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> PropertyNameList takes no arguments and returns a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6035"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> of Strings. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="PropertyDefinitionList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="zxofg8tg" id="prod-ojv3z_1M"><emu-nt id="_ref_20530"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>propName</var> be the <emu-xref aoid="PropName" id="_ref_6036"><a href="syntax-directed-operations.html#sec-static-semantics-propname">PropName</a></emu-xref> of <emu-nt id="_ref_20531"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt>.</li><li>If <var>propName</var> is <emu-const>empty</emu-const>, return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6037"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return « <var>propName</var>&nbsp;».</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinitionList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="mvlwazei" id="prod-arjQ9VdV">
<emu-nt id="_ref_20532"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt id="_ref_20533"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>list</var> be the <emu-xref aoid="PropertyNameList" id="_ref_6038"><a href="ecmascript-language-expressions.html#sec-static-semantics-propertynamelist">PropertyNameList</a></emu-xref> of <emu-nt id="_ref_20534"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt>.</li><li>Let <var>propName</var> be the <emu-xref aoid="PropName" id="_ref_6039"><a href="syntax-directed-operations.html#sec-static-semantics-propname">PropName</a></emu-xref> of <emu-nt id="_ref_20535"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt>.</li><li>If <var>propName</var> is <emu-const>empty</emu-const>, return <var>list</var>.</li><li>Return the <emu-xref href="#list-concatenation" id="_ref_6040"><a href="ecmascript-data-types-and-values.html#list-concatenation">list-concatenation</a></emu-xref> of <var>list</var> and « <var>propName</var>&nbsp;».</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-object-initializer-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.2.5.4</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ObjectLiteral" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gbpaspne" id="prod-iYCMBfyG">
<emu-t>{</emu-t>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="OrdinaryObjectCreate" id="_ref_6041"><a href="ordinary-and-exotic-objects-behaviours.html#sec-ordinaryobjectcreate">OrdinaryObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_6042"><a href="fundamental-objects.html#sec-properties-of-the-object-prototype-object">%Object.prototype%</a></emu-xref>).</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectLiteral">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="g--o073w" id="prod-0f4gdKLJ">
<emu-t>{</emu-t>
<emu-nt id="_ref_20536"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
<emu-rhs a="hwnsf_iz" id="prod-HzxDeaw2">
<emu-t>{</emu-t>
<emu-nt id="_ref_20537"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt>
<emu-t>,</emu-t>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>obj</var> be <emu-xref aoid="OrdinaryObjectCreate" id="_ref_6043"><a href="ordinary-and-exotic-objects-behaviours.html#sec-ordinaryobjectcreate">OrdinaryObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_6044"><a href="fundamental-objects.html#sec-properties-of-the-object-prototype-object">%Object.prototype%</a></emu-xref>).</li><li>Perform ?&nbsp;<emu-xref aoid="PropertyDefinitionEvaluation" id="_ref_6045"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-propertydefinitionevaluation" class="e-user-code">PropertyDefinitionEvaluation</a></emu-xref> of <emu-nt id="_ref_20538"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt> with argument <var>obj</var>.</li><li>Return <var>obj</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="drsx4tka" id="prod-ZrDWUX2E"><emu-nt id="_ref_20539"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return the <emu-xref aoid="StringValue" id="_ref_6046"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20540"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>.</li></ol></emu-alg>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="xhtltz00" id="prod-Jt_nMkj7"><emu-nt id="_ref_20541"><a href="ecmascript-language-lexical-grammar.html#prod-StringLiteral">StringLiteral</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return the <emu-xref aoid="SV" id="_ref_6047"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-sv">SV</a></emu-xref> of <emu-nt id="_ref_20542"><a href="ecmascript-language-lexical-grammar.html#prod-StringLiteral">StringLiteral</a></emu-nt>.</li></ol></emu-alg>
<emu-grammar><emu-production name="LiteralPropertyName" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LiteralPropertyName">LiteralPropertyName</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="pui0b1rt" id="prod-_aZrbYKk"><emu-nt id="_ref_20543"><a href="ecmascript-language-lexical-grammar.html#prod-NumericLiteral">NumericLiteral</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>nbr</var> be the <emu-xref aoid="NumericValue" id="_ref_6048"><a href="ecmascript-language-lexical-grammar.html#sec-numericvalue">NumericValue</a></emu-xref> of <emu-nt id="_ref_20544"><a href="ecmascript-language-lexical-grammar.html#prod-NumericLiteral">NumericLiteral</a></emu-nt>.</li><li>Return !&nbsp;<emu-xref aoid="ToString" id="_ref_6049"><a href="abstract-operations.html#sec-tostring">ToString</a></emu-xref>(<var>nbr</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="ComputedPropertyName" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ComputedPropertyName">ComputedPropertyName</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ltvvc-5a" id="prod-6rX2zzfJ">
<emu-t>[</emu-t>
<emu-nt id="_ref_20545"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>exprValue</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6050"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20546"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>propName</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6051"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>exprValue</var>).</li><li>Return ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_6052"><a href="abstract-operations.html#sec-topropertykey" class="e-user-code">ToPropertyKey</a></emu-xref>(<var>propName</var>).</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-propertydefinitionevaluation" oldids="sec-object-initializer-runtime-semantics-propertydefinitionevaluation" type="sdo" aoid="PropertyDefinitionEvaluation"><span id="sec-object-initializer-runtime-semantics-propertydefinitionevaluation"></span>
<h1><span class="secnum">13.2.5.5</span> Runtime Semantics: PropertyDefinitionEvaluation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6053"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> PropertyDefinitionEvaluation takes argument <var>object</var> (an Object) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6054"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> <emu-const>unused</emu-const> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6055"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="PropertyDefinitionList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="mvlwazei" id="prod-2nasR_1u">
<emu-nt id="_ref_20547"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt id="_ref_20548"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="PropertyDefinitionEvaluation" id="_ref_6056"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-propertydefinitionevaluation" class="e-user-code">PropertyDefinitionEvaluation</a></emu-xref> of <emu-nt id="_ref_20549"><a href="ecmascript-language-expressions.html#prod-PropertyDefinitionList">PropertyDefinitionList</a></emu-nt> with argument <var>object</var>.</li><li>Perform ?&nbsp;<emu-xref aoid="PropertyDefinitionEvaluation" id="_ref_6057"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-propertydefinitionevaluation" class="e-user-code">PropertyDefinitionEvaluation</a></emu-xref> of <emu-nt id="_ref_20550"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> with argument <var>object</var>.</li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="w7ifpmpd" id="prod-r1teTyPc">
<emu-t>...</emu-t>
<emu-nt id="_ref_20551"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>exprValue</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6058"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20552"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>fromValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6059"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>exprValue</var>).</li><li>Let <var>excludedNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6060"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Perform ?&nbsp;<emu-xref aoid="CopyDataProperties" id="_ref_6061"><a href="abstract-operations.html#sec-copydataproperties" class="e-user-code">CopyDataProperties</a></emu-xref>(<var>object</var>, <var>fromValue</var>, <var>excludedNames</var>).</li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="i2hxnrih" id="prod-pxaBv7Tq"><emu-nt id="_ref_20553"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>propName</var> be the <emu-xref aoid="StringValue" id="_ref_6062"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20554"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt>.</li><li>Let <var>exprValue</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6063"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20555"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt>.</li><li>Let <var>propValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6064"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>exprValue</var>).</li><li><emu-xref href="#assert" id="_ref_6065"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>object</var> is an ordinary, extensible object with no non-configurable properties.</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6066"><a href="abstract-operations.html#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propName</var>, <var>propValue</var>).</li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="8tkldtak" id="prod-N8qwXXqo">
<emu-nt id="_ref_20556"><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a></emu-nt>
<emu-t>:</emu-t>
<emu-nt id="_ref_20557"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>propKey</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6067"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20558"><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a></emu-nt>.</li><li>If this <emu-nt id="_ref_20559"><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> is contained within a <emu-nt id="_ref_20560"><a href="ecmascript-language-scripts-and-modules.html#prod-Script">Script</a></emu-nt> that is being evaluated for <emu-xref aoid="ParseJSON" id="_ref_6068"><a href="structured-data.html#sec-ParseJSON">ParseJSON</a></emu-xref> (see step <emu-xref href="#step-json-parse-eval" id="_ref_404"><a href="structured-data.html#step-json-parse-eval">6</a></emu-xref> of <emu-xref aoid="ParseJSON" id="_ref_6069"><a href="structured-data.html#sec-ParseJSON">ParseJSON</a></emu-xref>), then<ol><li>Let <var>isProtoSetter</var> be <emu-val>false</emu-val>.</li></ol></li><li>Else if <var>propKey</var> is <emu-val>"__proto__"</emu-val> and <emu-xref aoid="IsComputedPropertyKey" id="_ref_6070"><a href="ecmascript-language-expressions.html#sec-static-semantics-iscomputedpropertykey">IsComputedPropertyKey</a></emu-xref> of <emu-nt id="_ref_20561"><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a></emu-nt> is <emu-val>false</emu-val>, then<ol><li>Let <var>isProtoSetter</var> be <emu-val>true</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>isProtoSetter</var> be <emu-val>false</emu-val>.</li></ol></li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_6071"><a href="syntax-directed-operations.html#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_20562"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>) is <emu-val>true</emu-val> and <var>isProtoSetter</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>propValue</var> be ?&nbsp;<emu-xref aoid="NamedEvaluation" id="_ref_6072"><a href="syntax-directed-operations.html#sec-runtime-semantics-namedevaluation" class="e-user-code">NamedEvaluation</a></emu-xref> of <emu-nt id="_ref_20563"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>propKey</var>.</li></ol></li><li>Else,<ol><li>Let <var>exprValueRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6073"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20564"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>propValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6074"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>exprValueRef</var>).</li></ol></li><li>If <var>isProtoSetter</var> is <emu-val>true</emu-val>, then<ol><li>If <var>propValue</var> <emu-xref href="#sec-object-type" id="_ref_6075"><a href="ecmascript-data-types-and-values.html#sec-object-type">is an Object</a></emu-xref> or <var>propValue</var> is <emu-val>null</emu-val>, then<ol><li>Perform !&nbsp;<span class="e-user-code"><var>object</var>.<var class="field">[[SetPrototypeOf]]</var>(<var>propValue</var>)</span>.</li></ol></li><li>Return <emu-const>unused</emu-const>.</li></ol></li><li><emu-xref href="#assert" id="_ref_6076"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>object</var> is an ordinary, extensible object with no non-configurable properties.</li><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6077"><a href="abstract-operations.html#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>object</var>, <var>propKey</var>, <var>propValue</var>).</li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
<emu-grammar><emu-production name="PropertyDefinition" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PropertyDefinition">PropertyDefinition</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="s8ilfl9g" id="prod-FVQpyKtq"><emu-nt id="_ref_20565"><a href="ecmascript-language-functions-and-classes.html#prod-MethodDefinition">MethodDefinition</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="MethodDefinitionEvaluation" id="_ref_6078"><a href="ecmascript-language-functions-and-classes.html#sec-runtime-semantics-methoddefinitionevaluation" class="e-user-code">MethodDefinitionEvaluation</a></emu-xref> of <emu-nt id="_ref_20566"><a href="ecmascript-language-functions-and-classes.html#prod-MethodDefinition">MethodDefinition</a></emu-nt> with arguments <var>object</var> and <emu-val>true</emu-val>.</li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-function-defining-expressions">
<h1><span class="secnum">13.2.6</span> Function Defining Expressions</h1>
<p>See <emu-xref href="#sec-function-definitions" id="_ref_405"><a href="ecmascript-language-functions-and-classes.html#sec-function-definitions">15.2</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="jc7szv1s"><emu-nt id="_ref_20567"><a href="ecmascript-language-functions-and-classes.html#prod-FunctionExpression">FunctionExpression</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>.</p>
<p>See <emu-xref href="#sec-generator-function-definitions" id="_ref_406"><a href="ecmascript-language-functions-and-classes.html#sec-generator-function-definitions">15.5</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="q7f39ayg"><emu-nt id="_ref_20568"><a href="ecmascript-language-functions-and-classes.html#prod-GeneratorExpression">GeneratorExpression</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>.</p>
<p>See <emu-xref href="#sec-class-definitions" id="_ref_407"><a href="ecmascript-language-functions-and-classes.html#sec-class-definitions">15.7</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="2m5tsvzv"><emu-nt id="_ref_20569"><a href="ecmascript-language-functions-and-classes.html#prod-ClassExpression">ClassExpression</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>.</p>
<p>See <emu-xref href="#sec-async-function-definitions" id="_ref_408"><a href="ecmascript-language-functions-and-classes.html#sec-async-function-definitions">15.8</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="rvibtigb"><emu-nt id="_ref_20570"><a href="ecmascript-language-functions-and-classes.html#prod-AsyncFunctionExpression">AsyncFunctionExpression</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>.</p>
<p>See <emu-xref href="#sec-async-generator-function-definitions" id="_ref_409"><a href="ecmascript-language-functions-and-classes.html#sec-async-generator-function-definitions">15.6</a></emu-xref> for <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="naptrn97"><emu-nt id="_ref_20571"><a href="ecmascript-language-functions-and-classes.html#prod-AsyncGeneratorExpression">AsyncGeneratorExpression</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>.</p>
</emu-clause>
<emu-clause id="sec-primary-expression-regular-expression-literals">
<h1><span class="secnum">13.2.7</span> Regular Expression Literals</h1>
<h2>Syntax</h2>
<p>See <emu-xref href="#sec-literals-regular-expression-literals" id="_ref_410"><a href="ecmascript-language-lexical-grammar.html#sec-literals-regular-expression-literals">12.9.5</a></emu-xref>.</p>
<emu-clause id="sec-primary-expression-regular-expression-literals-static-semantics-early-errors">
<h1><span class="secnum">13.2.7.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="mbzy6lvr"><emu-nt id="_ref_20572"><a href="ecmascript-language-lexical-grammar.html#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-xref aoid="IsValidRegularExpressionLiteral" id="_ref_6079"><a href="ecmascript-language-expressions.html#sec-isvalidregularexpressionliteral">IsValidRegularExpressionLiteral</a></emu-xref>(<emu-nt id="_ref_20573"><a href="ecmascript-language-lexical-grammar.html#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>) is <emu-val>false</emu-val>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-isvalidregularexpressionliteral" type="abstract operation" aoid="IsValidRegularExpressionLiteral">
<h1><span class="secnum">13.2.7.2</span> Static Semantics: IsValidRegularExpressionLiteral ( <var>literal</var> )</h1>
<p>The abstract operation IsValidRegularExpressionLiteral takes argument <var>literal</var> (a <emu-nt id="_ref_20574"><a href="ecmascript-language-lexical-grammar.html#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6080"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>) and returns a Boolean. It determines if its argument is a valid regular expression literal. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>flags</var> be the <emu-xref aoid="FlagText" id="_ref_6081"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-flagtext">FlagText</a></emu-xref> of <var>literal</var>.</li><li>If <var>flags</var> contains any code points other than <code>d</code>, <code>g</code>, <code>i</code>, <code>m</code>, <code>s</code>, <code>u</code>, <code>v</code>, or <code>y</code>, or if <var>flags</var> contains any code point more than once, return <emu-val>false</emu-val>.</li><li>If <var>flags</var> contains <code>u</code>, let <var>u</var> be <emu-val>true</emu-val>; else let <var>u</var> be <emu-val>false</emu-val>.</li><li>If <var>flags</var> contains <code>v</code>, let <var>v</var> be <emu-val>true</emu-val>; else let <var>v</var> be <emu-val>false</emu-val>.</li><li>Let <var>patternText</var> be the <emu-xref aoid="BodyText" id="_ref_6082"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-bodytext">BodyText</a></emu-xref> of <var>literal</var>.</li><li>If <var>u</var> is <emu-val>false</emu-val> and <var>v</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>stringValue</var> be <emu-xref aoid="CodePointsToString" id="_ref_6083"><a href="ecmascript-language-source-code.html#sec-codepointstostring">CodePointsToString</a></emu-xref>(<var>patternText</var>).</li><li>Set <var>patternText</var> to the sequence of code points resulting from interpreting each of the 16-bit elements of <var>stringValue</var> as a Unicode BMP code point. UTF-16 decoding is not applied to the elements.</li></ol></li><li>Let <var>parseResult</var> be <emu-xref aoid="ParsePattern" id="_ref_6084"><a href="text-processing.html#sec-parsepattern">ParsePattern</a></emu-xref>(<var>patternText</var>, <var>u</var>, <var>v</var>).</li><li>If <var>parseResult</var> is a <emu-xref href="#sec-syntactic-grammar" id="_ref_6085"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-regular-expression-literals-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.2.7.3</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="mbzy6lvr" id="prod-J9TItKDI"><emu-nt id="_ref_20575"><a href="ecmascript-language-lexical-grammar.html#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>pattern</var> be <emu-xref aoid="CodePointsToString" id="_ref_6086"><a href="ecmascript-language-source-code.html#sec-codepointstostring">CodePointsToString</a></emu-xref>(<emu-xref aoid="BodyText" id="_ref_6087"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-bodytext">BodyText</a></emu-xref> of <emu-nt id="_ref_20576"><a href="ecmascript-language-lexical-grammar.html#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>).</li><li>Let <var>flags</var> be <emu-xref aoid="CodePointsToString" id="_ref_6088"><a href="ecmascript-language-source-code.html#sec-codepointstostring">CodePointsToString</a></emu-xref>(<emu-xref aoid="FlagText" id="_ref_6089"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-flagtext">FlagText</a></emu-xref> of <emu-nt id="_ref_20577"><a href="ecmascript-language-lexical-grammar.html#prod-RegularExpressionLiteral">RegularExpressionLiteral</a></emu-nt>).</li><li>Return !&nbsp;<emu-xref aoid="RegExpCreate" id="_ref_6090"><a href="text-processing.html#sec-regexpcreate">RegExpCreate</a></emu-xref>(<var>pattern</var>, <var>flags</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-template-literals">
<h1><span class="secnum">13.2.8</span> Template Literals</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="TemplateLiteral" params="Yield, Await, Tagged" id="prod-TemplateLiteral">
<emu-nt params="Yield, Await, Tagged"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="e_otk8es" id="prod-d430kMbv">
<emu-nt id="_ref_20578"><a href="ecmascript-language-lexical-grammar.html#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt>
</emu-rhs>
<emu-rhs a="8adkeoem" id="prod-t3USkzuD">
<emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_20579"><a href="ecmascript-language-expressions.html#prod-SubstitutionTemplate">SubstitutionTemplate</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="SubstitutionTemplate" params="Yield, Await, Tagged" id="prod-SubstitutionTemplate">
<emu-nt params="Yield, Await, Tagged"><a href="ecmascript-language-expressions.html#prod-SubstitutionTemplate">SubstitutionTemplate</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bpr_k7qa" id="prod-nG1t-jNI">
<emu-nt id="_ref_20580"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateHead">TemplateHead</a></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20581"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_20582"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="TemplateSpans" params="Yield, Await, Tagged" id="prod-TemplateSpans">
<emu-nt params="Yield, Await, Tagged"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v_5hijma" id="prod-MrvlbnHm">
<emu-nt id="_ref_20583"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt>
</emu-rhs>
<emu-rhs a="3pqtoeeo" id="prod-j0qqWY2p">
<emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_20584"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt>
<emu-nt id="_ref_20585"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="TemplateMiddleList" params="Yield, Await, Tagged" id="prod-TemplateMiddleList">
<emu-nt params="Yield, Await, Tagged"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="23_bspds" id="prod-V4hc4rPI">
<emu-nt id="_ref_20586"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20587"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="bdrr0gig" id="prod-PHoLfCK_">
<emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_20588"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt>
<emu-nt id="_ref_20589"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20590"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-static-semantics-template-early-errors" oldids="sec-primary-expression-template-literals-static-semantics-early-errors"><span id="sec-primary-expression-template-literals-static-semantics-early-errors"></span>
<h1><span class="secnum">13.2.8.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="TemplateLiteral" params="Yield, Await, Tagged" collapsed="">
<emu-nt params="Yield, Await, Tagged"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="e_otk8es"><emu-nt id="_ref_20591"><a href="ecmascript-language-lexical-grammar.html#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the <sub>[Tagged]</sub> parameter was not set and <emu-nt id="_ref_20592"><a href="ecmascript-language-lexical-grammar.html#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt> <emu-xref aoid="Contains" id="_ref_6091"><a href="syntax-directed-operations.html#sec-static-semantics-contains">Contains</a></emu-xref> <emu-nt id="_ref_20593"><a href="ecmascript-language-lexical-grammar.html#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="TemplateLiteral" params="Yield, Await, Tagged" collapsed="">
<emu-nt params="Yield, Await, Tagged"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="8adkeoem"><emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_20594"><a href="ecmascript-language-expressions.html#prod-SubstitutionTemplate">SubstitutionTemplate</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the number of elements in the <emu-xref aoid="TemplateStrings" id="_ref_6092"><a href="ecmascript-language-expressions.html#sec-static-semantics-templatestrings">TemplateStrings</a></emu-xref> of <emu-nt id="_ref_20595"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> with argument <emu-val>false</emu-val> is greater than or equal to 2<sup>32</sup>.
</li>
</ul>
<emu-grammar><emu-production name="SubstitutionTemplate" params="Yield, Await, Tagged" collapsed="">
<emu-nt params="Yield, Await, Tagged"><a href="ecmascript-language-expressions.html#prod-SubstitutionTemplate">SubstitutionTemplate</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bpr_k7qa">
<emu-nt id="_ref_20596"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateHead">TemplateHead</a></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20597"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_20598"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the <sub>[Tagged]</sub> parameter was not set and <emu-nt id="_ref_20599"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateHead">TemplateHead</a></emu-nt> <emu-xref aoid="Contains" id="_ref_6093"><a href="syntax-directed-operations.html#sec-static-semantics-contains">Contains</a></emu-xref> <emu-nt id="_ref_20600"><a href="ecmascript-language-lexical-grammar.html#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="TemplateSpans" params="Yield, Await, Tagged" collapsed="">
<emu-nt params="Yield, Await, Tagged"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v_5hijma"><emu-nt id="_ref_20601"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the <sub>[Tagged]</sub> parameter was not set and <emu-nt id="_ref_20602"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt> <emu-xref aoid="Contains" id="_ref_6094"><a href="syntax-directed-operations.html#sec-static-semantics-contains">Contains</a></emu-xref> <emu-nt id="_ref_20603"><a href="ecmascript-language-lexical-grammar.html#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="TemplateMiddleList" params="Yield, Await, Tagged">
<emu-nt params="Yield, Await, Tagged"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[Yield, Await, Tagged]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="23_bspds">
<emu-nt id="_ref_20604"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20605"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="bdrr0gig">
<emu-nt params="?Yield, ?Await, ?Tagged" id="_ref_20606"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a><emu-mods><emu-params>[?Yield, ?Await, ?Tagged]</emu-params></emu-mods></emu-nt>
<emu-nt id="_ref_20607"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20608"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the <sub>[Tagged]</sub> parameter was not set and <emu-nt id="_ref_20609"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt> <emu-xref aoid="Contains" id="_ref_6095"><a href="syntax-directed-operations.html#sec-static-semantics-contains">Contains</a></emu-xref> <emu-nt id="_ref_20610"><a href="ecmascript-language-lexical-grammar.html#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-static-semantics-templatestrings" type="sdo" aoid="TemplateStrings">
<h1><span class="secnum">13.2.8.2</span> Static Semantics: TemplateStrings</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6096"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> TemplateStrings takes argument <var>raw</var> (a Boolean) and returns a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6097"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> of either Strings or <emu-val>undefined</emu-val>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="TemplateLiteral" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="e_otk8es" id="prod-wUHw6ReH"><emu-nt id="_ref_20611"><a href="ecmascript-language-lexical-grammar.html#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return « <emu-xref aoid="TemplateString" id="_ref_6098"><a href="ecmascript-language-expressions.html#sec-templatestring">TemplateString</a></emu-xref>(<emu-nt id="_ref_20612"><a href="ecmascript-language-lexical-grammar.html#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt>, <var>raw</var>)&nbsp;».</li></ol></emu-alg>
<emu-grammar><emu-production name="SubstitutionTemplate" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-SubstitutionTemplate">SubstitutionTemplate</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vpxmqc6d" id="prod-AfRnt93a">
<emu-nt id="_ref_20613"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateHead">TemplateHead</a></emu-nt>
<emu-nt id="_ref_20614"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-nt id="_ref_20615"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be « <emu-xref aoid="TemplateString" id="_ref_6099"><a href="ecmascript-language-expressions.html#sec-templatestring">TemplateString</a></emu-xref>(<emu-nt id="_ref_20616"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateHead">TemplateHead</a></emu-nt>, <var>raw</var>)&nbsp;».</li><li>Let <var>tail</var> be the <emu-xref aoid="TemplateStrings" id="_ref_6100"><a href="ecmascript-language-expressions.html#sec-static-semantics-templatestrings">TemplateStrings</a></emu-xref> of <emu-nt id="_ref_20617"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt> with argument <var>raw</var>.</li><li>Return the <emu-xref href="#list-concatenation" id="_ref_6101"><a href="ecmascript-data-types-and-values.html#list-concatenation">list-concatenation</a></emu-xref> of <var>head</var> and <var>tail</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v_5hijma" id="prod-SXp_0Muf"><emu-nt id="_ref_20618"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return « <emu-xref aoid="TemplateString" id="_ref_6102"><a href="ecmascript-language-expressions.html#sec-templatestring">TemplateString</a></emu-xref>(<emu-nt id="_ref_20619"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt>, <var>raw</var>)&nbsp;».</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="slt0jvdm" id="prod-fValkc1v">
<emu-nt id="_ref_20620"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>
<emu-nt id="_ref_20621"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>middle</var> be the <emu-xref aoid="TemplateStrings" id="_ref_6103"><a href="ecmascript-language-expressions.html#sec-static-semantics-templatestrings">TemplateStrings</a></emu-xref> of <emu-nt id="_ref_20622"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> with argument <var>raw</var>.</li><li>Let <var>tail</var> be « <emu-xref aoid="TemplateString" id="_ref_6104"><a href="ecmascript-language-expressions.html#sec-templatestring">TemplateString</a></emu-xref>(<emu-nt id="_ref_20623"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt>, <var>raw</var>)&nbsp;».</li><li>Return the <emu-xref href="#list-concatenation" id="_ref_6105"><a href="ecmascript-data-types-and-values.html#list-concatenation">list-concatenation</a></emu-xref> of <var>middle</var> and <var>tail</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="3h7jyz9j" id="prod-sExxMRoA">
<emu-nt id="_ref_20624"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt id="_ref_20625"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return « <emu-xref aoid="TemplateString" id="_ref_6106"><a href="ecmascript-language-expressions.html#sec-templatestring">TemplateString</a></emu-xref>(<emu-nt id="_ref_20626"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>, <var>raw</var>)&nbsp;».</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="r6zwqruv" id="prod-oVK_xc-L">
<emu-nt id="_ref_20627"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>
<emu-nt id="_ref_20628"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt id="_ref_20629"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>front</var> be the <emu-xref aoid="TemplateStrings" id="_ref_6107"><a href="ecmascript-language-expressions.html#sec-static-semantics-templatestrings">TemplateStrings</a></emu-xref> of <emu-nt id="_ref_20630"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> with argument <var>raw</var>.</li><li>Let <var>last</var> be « <emu-xref aoid="TemplateString" id="_ref_6108"><a href="ecmascript-language-expressions.html#sec-templatestring">TemplateString</a></emu-xref>(<emu-nt id="_ref_20631"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>, <var>raw</var>)&nbsp;».</li><li>Return the <emu-xref href="#list-concatenation" id="_ref_6109"><a href="ecmascript-data-types-and-values.html#list-concatenation">list-concatenation</a></emu-xref> of <var>front</var> and <var>last</var>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-templatestring" type="abstract operation" aoid="TemplateString">
<h1><span class="secnum">13.2.8.3</span> Static Semantics: TemplateString ( <var>templateToken</var>, <var>raw</var> )</h1>
<p>The abstract operation TemplateString takes arguments <var>templateToken</var> (a <emu-nt id="_ref_20632"><a href="ecmascript-language-lexical-grammar.html#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6110"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>, a <emu-nt id="_ref_20633"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateHead">TemplateHead</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6111"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>, a <emu-nt id="_ref_20634"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6112"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>, or a <emu-nt id="_ref_20635"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6113"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>) and <var>raw</var> (a Boolean) and returns a String or <emu-val>undefined</emu-val>. It performs the following steps when called:</p>
<emu-alg><ol><li>If <var>raw</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>string</var> be the <emu-xref aoid="TRV" id="_ref_6114"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-trv">TRV</a></emu-xref> of <var>templateToken</var>.</li></ol></li><li>Else,<ol><li>Let <var>string</var> be the <emu-xref aoid="TV" id="_ref_6115"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-tv">TV</a></emu-xref> of <var>templateToken</var>.</li></ol></li><li>Return <var>string</var>.</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This operation returns <emu-val>undefined</emu-val> if <var>raw</var> is <emu-val>false</emu-val> and <var>templateToken</var> contains a <emu-nt id="_ref_20636"><a href="ecmascript-language-lexical-grammar.html#prod-NotEscapeSequence">NotEscapeSequence</a></emu-nt>. In all other cases, it returns a String.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-gettemplateobject" type="abstract operation" aoid="GetTemplateObject">
<h1><span class="secnum">13.2.8.4</span> GetTemplateObject ( <var>templateLiteral</var> )</h1>
<p>The abstract operation GetTemplateObject takes argument <var>templateLiteral</var> (a <emu-xref href="#sec-syntactic-grammar" id="_ref_6116"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>) and returns an Array. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>realm</var> be <emu-xref href="#current-realm" id="_ref_6117"><a href="executable-code-and-execution-contexts.html#current-realm">the current Realm Record</a></emu-xref>.</li><li>Let <var>templateRegistry</var> be <var>realm</var>.<var class="field">[[TemplateMap]]</var>.</li><li>For each element <var>e</var> of <var>templateRegistry</var>, do<ol><li>If <var>e</var>.<var class="field">[[Site]]</var> is <emu-xref href="#sec-syntactic-grammar" id="_ref_6118"><a href="notational-conventions.html#sec-syntactic-grammar">the same Parse Node</a></emu-xref> as <var>templateLiteral</var>, then<ol><li>Return <var>e</var>.<var class="field">[[Array]]</var>.</li></ol></li></ol></li><li>Let <var>rawStrings</var> be the <emu-xref aoid="TemplateStrings" id="_ref_6119"><a href="ecmascript-language-expressions.html#sec-static-semantics-templatestrings">TemplateStrings</a></emu-xref> of <var>templateLiteral</var> with argument <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_6120"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>rawStrings</var> is a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6121"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> of Strings.</li><li>Let <var>cookedStrings</var> be the <emu-xref aoid="TemplateStrings" id="_ref_6122"><a href="ecmascript-language-expressions.html#sec-static-semantics-templatestrings">TemplateStrings</a></emu-xref> of <var>templateLiteral</var> with argument <emu-val>false</emu-val>.</li><li>Let <var>count</var> be the number of elements in the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6123"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> <var>cookedStrings</var>.</li><li><emu-xref href="#assert" id="_ref_6124"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>count</var> ≤ 2<sup>32</sup> - 1.</li><li>Let <var>template</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6125"><a href="ordinary-and-exotic-objects-behaviours.html#sec-arraycreate">ArrayCreate</a></emu-xref>(<var>count</var>).</li><li>Let <var>rawObj</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6126"><a href="ordinary-and-exotic-objects-behaviours.html#sec-arraycreate">ArrayCreate</a></emu-xref>(<var>count</var>).</li><li>Let <var>index</var> be 0.</li><li>Repeat, while <var>index</var> &lt; <var>count</var>,<ol><li>Let <var>prop</var> be !&nbsp;<emu-xref aoid="ToString" id="_ref_6127"><a href="abstract-operations.html#sec-tostring">ToString</a></emu-xref>(<emu-xref aoid="𝔽" id="_ref_6128"><a href="notational-conventions.html#%F0%9D%94%BD">𝔽</a></emu-xref>(<var>index</var>)).</li><li>Let <var>cookedValue</var> be <var>cookedStrings</var>[<var>index</var>].</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_6129"><a href="abstract-operations.html#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>template</var>, <var>prop</var>, PropertyDescriptor { <var class="field">[[Value]]</var>: <var>cookedValue</var>, <var class="field">[[Writable]]</var>: <emu-val>false</emu-val>, <var class="field">[[Enumerable]]</var>: <emu-val>true</emu-val>, <var class="field">[[Configurable]]</var>: <emu-val>false</emu-val>&nbsp;}).</li><li>Let <var>rawValue</var> be the String value <var>rawStrings</var>[<var>index</var>].</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_6130"><a href="abstract-operations.html#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>rawObj</var>, <var>prop</var>, PropertyDescriptor { <var class="field">[[Value]]</var>: <var>rawValue</var>, <var class="field">[[Writable]]</var>: <emu-val>false</emu-val>, <var class="field">[[Enumerable]]</var>: <emu-val>true</emu-val>, <var class="field">[[Configurable]]</var>: <emu-val>false</emu-val>&nbsp;}).</li><li>Set <var>index</var> to <var>index</var> + 1.</li></ol></li><li>Perform !&nbsp;<emu-xref aoid="SetIntegrityLevel" id="_ref_6131"><a href="abstract-operations.html#sec-setintegritylevel">SetIntegrityLevel</a></emu-xref>(<var>rawObj</var>, <emu-const>frozen</emu-const>).</li><li>Perform !&nbsp;<emu-xref aoid="DefinePropertyOrThrow" id="_ref_6132"><a href="abstract-operations.html#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>template</var>, <emu-val>"raw"</emu-val>, PropertyDescriptor { <var class="field">[[Value]]</var>: <var>rawObj</var>, <var class="field">[[Writable]]</var>: <emu-val>false</emu-val>, <var class="field">[[Enumerable]]</var>: <emu-val>false</emu-val>, <var class="field">[[Configurable]]</var>: <emu-val>false</emu-val>&nbsp;}).</li><li>Perform !&nbsp;<emu-xref aoid="SetIntegrityLevel" id="_ref_6133"><a href="abstract-operations.html#sec-setintegritylevel">SetIntegrityLevel</a></emu-xref>(<var>template</var>, <emu-const>frozen</emu-const>).</li><li>Append the <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6134"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Site]]</var>: <var>templateLiteral</var>, <var class="field">[[Array]]</var>: <var>template</var>&nbsp;} to <var>realm</var>.<var class="field">[[TemplateMap]]</var>.</li><li>Return <var>template</var>.</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The creation of a template object cannot result in an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6135"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Each <emu-nt id="_ref_20637"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> in the program code of a <emu-xref href="#realm" id="_ref_6136"><a href="executable-code-and-execution-contexts.html#realm">realm</a></emu-xref> is associated with a unique template object that is used in the evaluation of tagged Templates (<emu-xref href="#sec-template-literals-runtime-semantics-evaluation" id="_ref_411"><a href="ecmascript-language-expressions.html#sec-template-literals-runtime-semantics-evaluation">13.2.8.6</a></emu-xref>). The template objects are frozen and the same template object is used each time a specific tagged Template is evaluated. Whether template objects are created lazily upon first evaluation of the <emu-nt id="_ref_20638"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> or eagerly prior to first evaluation is an implementation choice that is not observable to ECMAScript code.</p>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>Future editions of this specification may define additional non-enumerable properties of template objects.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-runtime-semantics-substitutionevaluation" type="sdo" aoid="SubstitutionEvaluation">
<h1><span class="secnum">13.2.8.5</span> Runtime Semantics: SubstitutionEvaluation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6137"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> SubstitutionEvaluation takes no arguments and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6138"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6139"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-xref href="#sec-ecmascript-language-types" id="_ref_6140"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language values</a></emu-xref> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6141"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v_5hijma" id="prod-h8M7VnrX"><emu-nt id="_ref_20639"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6142"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="slt0jvdm" id="prod-0ukbbNyO">
<emu-nt id="_ref_20640"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>
<emu-nt id="_ref_20641"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="SubstitutionEvaluation" id="_ref_6143"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-substitutionevaluation" class="e-user-code">SubstitutionEvaluation</a></emu-xref> of <emu-nt id="_ref_20642"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>.</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="3h7jyz9j" id="prod-oOPfrahZ">
<emu-nt id="_ref_20643"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt id="_ref_20644"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>subRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6144"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20645"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>sub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6145"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>subRef</var>).</li><li>Return « <var>sub</var>&nbsp;».</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="r6zwqruv" id="prod-Jm_C6N1j">
<emu-nt id="_ref_20646"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>
<emu-nt id="_ref_20647"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt id="_ref_20648"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>preceding</var> be ?&nbsp;<emu-xref aoid="SubstitutionEvaluation" id="_ref_6146"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-substitutionevaluation" class="e-user-code">SubstitutionEvaluation</a></emu-xref> of <emu-nt id="_ref_20649"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>.</li><li>Let <var>nextRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6147"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20650"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6148"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>nextRef</var>).</li><li>Return the <emu-xref href="#list-concatenation" id="_ref_6149"><a href="ecmascript-data-types-and-values.html#list-concatenation">list-concatenation</a></emu-xref> of <var>preceding</var> and « <var>next</var>&nbsp;».</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-template-literals-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.2.8.6</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="TemplateLiteral" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="e_otk8es" id="prod-1J8emXVO"><emu-nt id="_ref_20651"><a href="ecmascript-language-lexical-grammar.html#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return the <emu-xref aoid="TV" id="_ref_6150"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-tv">TV</a></emu-xref> of <emu-nt id="_ref_20652"><a href="ecmascript-language-lexical-grammar.html#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_412"><a href="ecmascript-language-lexical-grammar.html#sec-template-literal-lexical-components">12.9.6</a></emu-xref>.</li></ol></emu-alg>
<emu-grammar><emu-production name="SubstitutionTemplate" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-SubstitutionTemplate">SubstitutionTemplate</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vpxmqc6d" id="prod-uvbVZ8aQ">
<emu-nt id="_ref_20653"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateHead">TemplateHead</a></emu-nt>
<emu-nt id="_ref_20654"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-nt id="_ref_20655"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be the <emu-xref aoid="TV" id="_ref_6151"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-tv">TV</a></emu-xref> of <emu-nt id="_ref_20656"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateHead">TemplateHead</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_413"><a href="ecmascript-language-lexical-grammar.html#sec-template-literal-lexical-components">12.9.6</a></emu-xref>.</li><li>Let <var>subRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6152"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20657"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>sub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6153"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>subRef</var>).</li><li>Let <var>middle</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6154"><a href="abstract-operations.html#sec-tostring" class="e-user-code">ToString</a></emu-xref>(<var>sub</var>).</li><li>Let <var>tail</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6155"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20658"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt>.</li><li>Return the <emu-xref href="#string-concatenation" id="_ref_6156"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of <var>head</var>, <var>middle</var>, and <var>tail</var>.</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The string conversion semantics applied to the <emu-nt id="_ref_20659"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt> value are like <code>String.prototype.concat</code> rather than the <code>+</code> operator.</p>
</div></emu-note>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v_5hijma" id="prod-Cn8o0vt2"><emu-nt id="_ref_20660"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return the <emu-xref aoid="TV" id="_ref_6157"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-tv">TV</a></emu-xref> of <emu-nt id="_ref_20661"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_414"><a href="ecmascript-language-lexical-grammar.html#sec-template-literal-lexical-components">12.9.6</a></emu-xref>.</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateSpans" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="slt0jvdm" id="prod-4-zhpQ6s">
<emu-nt id="_ref_20662"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>
<emu-nt id="_ref_20663"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6158"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20664"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>.</li><li>Let <var>tail</var> be the <emu-xref aoid="TV" id="_ref_6159"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-tv">TV</a></emu-xref> of <emu-nt id="_ref_20665"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateTail">TemplateTail</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_415"><a href="ecmascript-language-lexical-grammar.html#sec-template-literal-lexical-components">12.9.6</a></emu-xref>.</li><li>Return the <emu-xref href="#string-concatenation" id="_ref_6160"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of <var>head</var> and <var>tail</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="3h7jyz9j" id="prod-EX4ICnFk">
<emu-nt id="_ref_20666"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt id="_ref_20667"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>head</var> be the <emu-xref aoid="TV" id="_ref_6161"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-tv">TV</a></emu-xref> of <emu-nt id="_ref_20668"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_416"><a href="ecmascript-language-lexical-grammar.html#sec-template-literal-lexical-components">12.9.6</a></emu-xref>.</li><li>Let <var>subRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6162"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20669"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>sub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6163"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>subRef</var>).</li><li>Let <var>middle</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6164"><a href="abstract-operations.html#sec-tostring" class="e-user-code">ToString</a></emu-xref>(<var>sub</var>).</li><li>Return the <emu-xref href="#string-concatenation" id="_ref_6165"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of <var>head</var> and <var>middle</var>.</li></ol></emu-alg>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The string conversion semantics applied to the <emu-nt id="_ref_20670"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt> value are like <code>String.prototype.concat</code> rather than the <code>+</code> operator.</p>
</div></emu-note>
<emu-grammar><emu-production name="TemplateMiddleList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="r6zwqruv" id="prod-F5opRz-R">
<emu-nt id="_ref_20671"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>
<emu-nt id="_ref_20672"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt>
<emu-nt id="_ref_20673"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>rest</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6166"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20674"><a href="ecmascript-language-expressions.html#prod-TemplateMiddleList">TemplateMiddleList</a></emu-nt>.</li><li>Let <var>middle</var> be the <emu-xref aoid="TV" id="_ref_6167"><a href="ecmascript-language-lexical-grammar.html#sec-static-semantics-tv">TV</a></emu-xref> of <emu-nt id="_ref_20675"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateMiddle">TemplateMiddle</a></emu-nt> as defined in <emu-xref href="#sec-template-literal-lexical-components" id="_ref_417"><a href="ecmascript-language-lexical-grammar.html#sec-template-literal-lexical-components">12.9.6</a></emu-xref>.</li><li>Let <var>subRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6168"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20676"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>sub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6169"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>subRef</var>).</li><li>Let <var>last</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6170"><a href="abstract-operations.html#sec-tostring" class="e-user-code">ToString</a></emu-xref>(<var>sub</var>).</li><li>Return the <emu-xref href="#string-concatenation" id="_ref_6171"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of <var>rest</var>, <var>middle</var>, and <var>last</var>.</li></ol></emu-alg>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>The string conversion semantics applied to the <emu-nt id="_ref_20677"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt> value are like <code>String.prototype.concat</code> rather than the <code>+</code> operator.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-grouping-operator">
<h1><span class="secnum">13.2.9</span> The Grouping Operator</h1>
<emu-clause id="sec-grouping-operator-static-semantics-early-errors">
<h1><span class="secnum">13.2.9.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="yrb110hm"><emu-nt id="_ref_20678"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
<emu-nt id="_ref_20679"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> <emu-xref href="#must-cover" id="_ref_6172"><a href="notational-conventions.html#must-cover">must cover</a></emu-xref> a <emu-nt id="_ref_20680"><a href="ecmascript-language-expressions.html#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-grouping-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.2.9.2</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="yrb110hm" id="prod-U7_IxrKv"><emu-nt id="_ref_20681"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be the <emu-nt id="_ref_20682"><a href="ecmascript-language-expressions.html#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_6173"><a href="notational-conventions.html#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_20683"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6174"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <var>expr</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ParenthesizedExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ParenthesizedExpression">ParenthesizedExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="s6bvnd5v" id="prod-cTC10Rwh">
<emu-t>(</emu-t>
<emu-nt id="_ref_20684"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-t>)</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6175"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20685"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>. This may be of type Reference.</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This algorithm does not apply <emu-xref aoid="GetValue" id="_ref_6176"><a href="ecmascript-data-types-and-values.html#sec-getvalue">GetValue</a></emu-xref> to <emu-xref aoid="Evaluation" id="_ref_6177"><a href="syntax-directed-operations.html#sec-evaluation">Evaluation</a></emu-xref> of <emu-nt id="_ref_20686"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>. The principal motivation for this is so that operators such as <code>delete</code> and <code>typeof</code> may be applied to parenthesized expressions.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-left-hand-side-expressions">
<h1><span class="secnum">13.3</span> Left-Hand-Side Expressions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="MemberExpression" params="Yield, Await" id="prod-MemberExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="zp2ej-dr" id="prod-RT3Hrl25">
<emu-nt params="?Yield, ?Await" id="_ref_20687"><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="rnalvwun" id="prod-IScPEVPu">
<emu-nt params="?Yield, ?Await" id="_ref_20688"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>[</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20689"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
<emu-rhs a="_qdjqibg" id="prod-BTxM7XK0">
<emu-nt params="?Yield, ?Await" id="_ref_20690"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20691"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
<emu-rhs a="46cuzeza" id="prod-hF7lIb25">
<emu-nt params="?Yield, ?Await" id="_ref_20692"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await, +Tagged" id="_ref_20693"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, +Tagged]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="g9rhupwf" id="prod-gkYgn85G">
<emu-nt params="?Yield, ?Await" id="_ref_20694"><a href="ecmascript-language-expressions.html#prod-SuperProperty">SuperProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="yb7id2be" id="prod-EZ2BF6v8">
<emu-nt id="_ref_20695"><a href="ecmascript-language-expressions.html#prod-MetaProperty">MetaProperty</a></emu-nt>
</emu-rhs>
<emu-rhs a="ufvcifdc" id="prod-BRZkuqi1">
<emu-t>new</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20696"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20697"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="4cnbmhao" id="prod-20SfjmEZ">
<emu-nt params="?Yield, ?Await" id="_ref_20698"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20699"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="SuperProperty" params="Yield, Await" id="prod-SuperProperty">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-SuperProperty">SuperProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="f2abn9oi" id="prod-lWlOKYig">
<emu-t>super</emu-t>
<emu-t>[</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20700"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
<emu-rhs a="9pdsslwb" id="prod-6y-_egWQ">
<emu-t>super</emu-t>
<emu-t>.</emu-t>
<emu-nt id="_ref_20701"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="MetaProperty" id="prod-MetaProperty">
<emu-nt><a href="ecmascript-language-expressions.html#prod-MetaProperty">MetaProperty</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="czvbijjt">
<emu-nt id="_ref_20702"><a href="ecmascript-language-expressions.html#prod-NewTarget">NewTarget</a></emu-nt>
</emu-rhs>
<emu-rhs a="_cnkj-qp">
<emu-nt id="_ref_20703"><a href="ecmascript-language-expressions.html#prod-ImportMeta">ImportMeta</a></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="NewTarget" id="prod-NewTarget">
<emu-nt><a href="ecmascript-language-expressions.html#prod-NewTarget">NewTarget</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0t4hpsv9" id="prod-4bMdCOPa">
<emu-t>new</emu-t>
<emu-t>.</emu-t>
<emu-t>target</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="ImportMeta" id="prod-ImportMeta">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ImportMeta">ImportMeta</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="8myn6frq" id="prod-qIsN6LkP">
<emu-t>import</emu-t>
<emu-t>.</emu-t>
<emu-t>meta</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="NewExpression" params="Yield, Await" id="prod-NewExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-NewExpression">NewExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vbcu9jjv">
<emu-nt params="?Yield, ?Await" id="_ref_20704"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="iyf_se48" id="prod-NMg_0YQR">
<emu-t>new</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20705"><a href="ecmascript-language-expressions.html#prod-NewExpression">NewExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="CallExpression" params="Yield, Await" id="prod-CallExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="callcover" id="prod-ltrZioVe">
<emu-nt params="?Yield, ?Await" id="_ref_20706"><a href="ecmascript-language-functions-and-classes.html#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="5cynbd7h" id="prod-G9gIp39y">
<emu-nt params="?Yield, ?Await" id="_ref_20707"><a href="ecmascript-language-expressions.html#prod-SuperCall">SuperCall</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="12avhmhv" id="prod-5bjr6Yqy">
<emu-nt params="?Yield, ?Await" id="_ref_20708"><a href="ecmascript-language-expressions.html#prod-ImportCall">ImportCall</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="zq2ahe82" id="prod-kYvem_87">
<emu-nt params="?Yield, ?Await" id="_ref_20709"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20710"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="jan4qzpu" id="prod-Shb6Dgff">
<emu-nt params="?Yield, ?Await" id="_ref_20711"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>[</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20712"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
<emu-rhs a="8fzekpe0" id="prod-EOA2Fe3-">
<emu-nt params="?Yield, ?Await" id="_ref_20713"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20714"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
<emu-rhs a="xe3ycfgs" id="prod-WPBp76A-">
<emu-nt params="?Yield, ?Await" id="_ref_20715"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await, +Tagged" id="_ref_20716"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, +Tagged]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="62npgx0j" id="prod-FwaLgcLH">
<emu-nt params="?Yield, ?Await" id="_ref_20717"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20718"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="SuperCall" params="Yield, Await" id="prod-SuperCall">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-SuperCall">SuperCall</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="a1uz3ssm" id="prod-qBjKPlc1">
<emu-t>super</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20719"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="ImportCall" params="Yield, Await" id="prod-ImportCall">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ImportCall">ImportCall</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="lxdwtaop" id="prod-k77_OH1u">
<emu-t>import</emu-t>
<emu-t>(</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20720"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t optional="">,<emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-t>
<emu-t>)</emu-t>
</emu-rhs>
<emu-rhs a="vxyviles" id="prod-nQPLRauX">
<emu-t>import</emu-t>
<emu-t>(</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20721"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20722"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t optional="">,<emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-t>
<emu-t>)</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="Arguments" params="Yield, Await" id="prod-Arguments">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="eormm5tk" id="prod-lgwqNVq7">
<emu-t>(</emu-t>
<emu-t>)</emu-t>
</emu-rhs>
<emu-rhs a="zoyucce7">
<emu-t>(</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20723"><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>)</emu-t>
</emu-rhs>
<emu-rhs a="xsawavht">
<emu-t>(</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20724"><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-t>)</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="ArgumentList" params="Yield, Await" id="prod-ArgumentList">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="j1moyzsj" id="prod-7tzqa9tS">
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20725"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="tio0yijn" id="prod-bq3bMpyK">
<emu-t>...</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20726"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="krcqss7_" id="prod--rnN0MQv">
<emu-nt params="?Yield, ?Await" id="_ref_20727"><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20728"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="1ve8zfk_" id="prod-1jakKBk1">
<emu-nt params="?Yield, ?Await" id="_ref_20729"><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-t>...</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20730"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="OptionalExpression" params="Yield, Await" id="prod-OptionalExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-OptionalExpression">OptionalExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ecu35e6c" id="prod-AiLVvGnw">
<emu-nt params="?Yield, ?Await" id="_ref_20731"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20732"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="zdg__vw8" id="prod-dfra8X0j">
<emu-nt params="?Yield, ?Await" id="_ref_20733"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20734"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="w8fdvlpp" id="prod-iAWRBWZp">
<emu-nt params="?Yield, ?Await" id="_ref_20735"><a href="ecmascript-language-expressions.html#prod-OptionalExpression">OptionalExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20736"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="OptionalChain" params="Yield, Await" id="prod-OptionalChain">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="8htvkqhl" id="prod-J4fvvwWl">
<emu-t>?.</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20737"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="dfjbcotw" id="prod-a5k1i_eU">
<emu-t>?.</emu-t>
<emu-t>[</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20738"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
<emu-rhs a="w-4ch2am" id="prod-JoCAeM_3">
<emu-t>?.</emu-t>
<emu-nt id="_ref_20739"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
<emu-rhs a="gddsvrzp">
<emu-t>?.</emu-t>
<emu-nt params="?Yield, ?Await, +Tagged" id="_ref_20740"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, +Tagged]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="0xlnjlpz" id="prod-qtd11XGp">
<emu-t>?.</emu-t>
<emu-nt id="_ref_20741"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
<emu-rhs a="mf2i0e3e" id="prod-zMZUOMrf">
<emu-nt params="?Yield, ?Await" id="_ref_20742"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20743"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="tyrnajyn" id="prod-4aVR1jLh">
<emu-nt params="?Yield, ?Await" id="_ref_20744"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>[</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_20745"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
<emu-rhs a="nm82pnnk" id="prod-25V7_u74">
<emu-nt params="?Yield, ?Await" id="_ref_20746"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20747"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
<emu-rhs a="i6asyits">
<emu-nt params="?Yield, ?Await" id="_ref_20748"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await, +Tagged" id="_ref_20749"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a><emu-mods><emu-params>[?Yield, ?Await, +Tagged]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="tglbsgos" id="prod-MW9Cgivd">
<emu-nt params="?Yield, ?Await" id="_ref_20750"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20751"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="LeftHandSideExpression" params="Yield, Await" id="prod-LeftHandSideExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="qjnhzlak">
<emu-nt params="?Yield, ?Await" id="_ref_20752"><a href="ecmascript-language-expressions.html#prod-NewExpression">NewExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="hpn2js4d" id="prod-cMsSM13C">
<emu-nt params="?Yield, ?Await" id="_ref_20753"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="hwcrnmoq" id="prod-xKiE8xPm">
<emu-nt params="?Yield, ?Await" id="_ref_20754"><a href="ecmascript-language-expressions.html#prod-OptionalExpression">OptionalExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<h2>Supplemental Syntax</h2>
<p>
When processing an instance of the production<br>
<emu-grammar><emu-production name="CallExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="7jj-96li"><emu-nt id="_ref_20755"><a href="ecmascript-language-functions-and-classes.html#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar><br>
the interpretation of <emu-nt id="_ref_20756"><a href="ecmascript-language-functions-and-classes.html#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt> is refined using the following grammar:
</p>
<emu-grammar type="definition"><emu-production name="CallMemberExpression" params="Yield, Await" id="prod-CallMemberExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-CallMemberExpression">CallMemberExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="90e-xzcw">
<emu-nt params="?Yield, ?Await" id="_ref_20757"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20758"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-static-semantics">
<h1><span class="secnum">13.3.1</span> Static Semantics</h1>
<emu-clause id="sec-left-hand-side-expressions-static-semantics-early-errors">
<h1><span class="secnum">13.3.1.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="OptionalChain">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="tfcmykyj">
<emu-t>?.</emu-t>
<emu-nt id="_ref_20759"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>
</emu-rhs>
<emu-rhs a="ocv4xe0-">
<emu-nt id="_ref_20760"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>
<emu-nt id="_ref_20761"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if any source text is matched by this production.
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>This production exists in order to prevent automatic semicolon insertion rules (<emu-xref href="#sec-automatic-semicolon-insertion" id="_ref_418"><a href="ecmascript-language-lexical-grammar.html#sec-automatic-semicolon-insertion">12.10</a></emu-xref>) from being applied to the following code:</p>
<pre><code class="javascript hljs">a?.<span class="hljs-property">b</span>
<span class="hljs-string">`c`</span></code></pre>
<p>so that it would be interpreted as two valid statements. The purpose is to maintain consistency with similar code without optional chaining:</p>
<pre><code class="javascript hljs">a.<span class="hljs-property">b</span>
<span class="hljs-string">`c`</span></code></pre>
<p>which is a valid statement and where automatic semicolon insertion does not apply.</p>
</div></emu-note>
<emu-grammar><emu-production name="ImportMeta">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ImportMeta">ImportMeta</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="8myn6frq">
<emu-t>import</emu-t>
<emu-t>.</emu-t>
<emu-t>meta</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the syntactic <emu-xref href="#sec-context-free-grammars" id="_ref_6178"><a href="notational-conventions.html#sec-context-free-grammars">goal symbol</a></emu-xref> is not <emu-nt id="_ref_20762"><a href="ecmascript-language-scripts-and-modules.html#prod-Module">Module</a></emu-nt>.
</li>
</ul>
</emu-clause>
</emu-clause>
<emu-clause id="sec-property-accessors">
<h1><span class="secnum">13.3.2</span> Property Accessors</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Properties are accessed by name, using either the dot notation:</p>
<div class="rhs">
<emu-nt id="_ref_20763"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <code>.</code> <emu-nt id="_ref_20764"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt><br>
<emu-nt id="_ref_20765"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <code>.</code> <emu-nt id="_ref_20766"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</div>
<p>or the bracket notation:</p>
<div class="rhs">
<emu-nt id="_ref_20767"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <code>[</code> <emu-nt id="_ref_20768"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt> <code>]</code><br>
<emu-nt id="_ref_20769"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <code>[</code> <emu-nt id="_ref_20770"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt> <code>]</code>
</div>
<p>The dot notation is explained by the following syntactic conversion:</p>
<div class="rhs">
<emu-nt id="_ref_20771"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <code>.</code> <emu-nt id="_ref_20772"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</div>
<p>is identical in its behaviour to</p>
<div class="rhs">
<emu-nt id="_ref_20773"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <code>[</code> &lt;<i>identifier-name-string</i>&gt; <code>]</code>
</div>
<p>and similarly</p>
<div class="rhs">
<emu-nt id="_ref_20774"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <code>.</code> <emu-nt id="_ref_20775"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</div>
<p>is identical in its behaviour to</p>
<div class="rhs">
<emu-nt id="_ref_20776"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <code>[</code> &lt;<i>identifier-name-string</i>&gt; <code>]</code>
</div>
<p>where &lt;<i>identifier-name-string</i>&gt; is the <emu-xref aoid="StringValue" id="_ref_6179"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20777"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>.</p>
</div></emu-note>
<emu-clause id="sec-property-accessors-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.3.2.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="a74xd7de" id="prod-3HizunKA">
<emu-nt id="_ref_20778"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>
<emu-t>[</emu-t>
<emu-nt id="_ref_20779"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6180"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20780"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6181"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6182"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20781"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluatePropertyAccessWithExpressionKey" id="_ref_6183"><a href="ecmascript-language-expressions.html#sec-evaluate-property-access-with-expression-key" class="e-user-code">EvaluatePropertyAccessWithExpressionKey</a></emu-xref>(<var>baseValue</var>, <emu-nt id="_ref_20782"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="frbj984t" id="prod-BG7ZKp5h">
<emu-nt id="_ref_20783"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20784"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6184"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20785"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6185"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6186"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20786"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>).</li><li>Return <emu-xref aoid="EvaluatePropertyAccessWithIdentifierKey" id="_ref_6187"><a href="ecmascript-language-expressions.html#sec-evaluate-property-access-with-identifier-key">EvaluatePropertyAccessWithIdentifierKey</a></emu-xref>(<var>baseValue</var>, <emu-nt id="_ref_20787"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0uk9afbi" id="prod-ufIc-5xW">
<emu-nt id="_ref_20788"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20789"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6188"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20790"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6189"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>Let <var>fieldNameString</var> be the <emu-xref aoid="StringValue" id="_ref_6190"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20791"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>.</li><li>Return <emu-xref aoid="MakePrivateReference" id="_ref_6191"><a href="ecmascript-data-types-and-values.html#sec-makeprivatereference">MakePrivateReference</a></emu-xref>(<var>baseValue</var>, <var>fieldNameString</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="2u2urbmg" id="prod-JQpFT9fK">
<emu-nt id="_ref_20792"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>
<emu-t>[</emu-t>
<emu-nt id="_ref_20793"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6192"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20794"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6193"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6194"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20795"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluatePropertyAccessWithExpressionKey" id="_ref_6195"><a href="ecmascript-language-expressions.html#sec-evaluate-property-access-with-expression-key" class="e-user-code">EvaluatePropertyAccessWithExpressionKey</a></emu-xref>(<var>baseValue</var>, <emu-nt id="_ref_20796"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="u6lsbvgu" id="prod-zAM15mqm">
<emu-nt id="_ref_20797"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20798"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6196"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20799"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6197"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6198"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20800"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>).</li><li>Return <emu-xref aoid="EvaluatePropertyAccessWithIdentifierKey" id="_ref_6199"><a href="ecmascript-language-expressions.html#sec-evaluate-property-access-with-identifier-key">EvaluatePropertyAccessWithIdentifierKey</a></emu-xref>(<var>baseValue</var>, <emu-nt id="_ref_20801"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="cysjk9wh" id="prod-CLxiRtJM">
<emu-nt id="_ref_20802"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20803"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6200"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20804"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6201"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>Let <var>fieldNameString</var> be the <emu-xref aoid="StringValue" id="_ref_6202"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20805"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>.</li><li>Return <emu-xref aoid="MakePrivateReference" id="_ref_6203"><a href="ecmascript-data-types-and-values.html#sec-makeprivatereference">MakePrivateReference</a></emu-xref>(<var>baseValue</var>, <var>fieldNameString</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-evaluate-property-access-with-expression-key" type="abstract operation" oldids="sec-evaluate-expression-key-property-access" aoid="EvaluatePropertyAccessWithExpressionKey"><span id="sec-evaluate-expression-key-property-access"></span>
<h1><span class="secnum">13.3.3</span> EvaluatePropertyAccessWithExpressionKey ( <var>baseValue</var>, <var>expression</var>, <var>strict</var> )</h1>
<p>The abstract operation EvaluatePropertyAccessWithExpressionKey takes arguments <var>baseValue</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6204"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>), <var>expression</var> (an <emu-nt id="_ref_20806"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6205"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>), and <var>strict</var> (a Boolean) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6206"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> a <emu-xref href="#sec-reference-record-specification-type" id="_ref_6207"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6208"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>propertyNameReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6209"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <var>expression</var>.</li><li>Let <var>propertyNameValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6210"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>propertyNameReference</var>).</li><li>NOTE: In most cases, <emu-xref aoid="ToPropertyKey" id="_ref_6211"><a href="abstract-operations.html#sec-topropertykey">ToPropertyKey</a></emu-xref> will be performed on <var>propertyNameValue</var> immediately after this step. However, in the case of <code>a[b] = c</code>, it will not be performed until after evaluation of <code>c</code>.</li><li>Return the <emu-xref href="#sec-reference-record-specification-type" id="_ref_6212"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref> { <var class="field">[[Base]]</var>: <var>baseValue</var>, <var class="field">[[ReferencedName]]</var>: <var>propertyNameValue</var>, <var class="field">[[Strict]]</var>: <var>strict</var>, <var class="field">[[ThisValue]]</var>: <emu-const>empty</emu-const>&nbsp;}.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-evaluate-property-access-with-identifier-key" type="abstract operation" oldids="sec-evaluate-identifier-key-property-access" aoid="EvaluatePropertyAccessWithIdentifierKey"><span id="sec-evaluate-identifier-key-property-access"></span>
<h1><span class="secnum">13.3.4</span> EvaluatePropertyAccessWithIdentifierKey ( <var>baseValue</var>, <var>identifierName</var>, <var>strict</var> )</h1>
<p>The abstract operation EvaluatePropertyAccessWithIdentifierKey takes arguments <var>baseValue</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6213"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>), <var>identifierName</var> (an <emu-nt id="_ref_20807"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6214"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>), and <var>strict</var> (a Boolean) and returns a <emu-xref href="#sec-reference-record-specification-type" id="_ref_6215"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>propertyNameString</var> be the <emu-xref aoid="StringValue" id="_ref_6216"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <var>identifierName</var>.</li><li>Return the <emu-xref href="#sec-reference-record-specification-type" id="_ref_6217"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref> { <var class="field">[[Base]]</var>: <var>baseValue</var>, <var class="field">[[ReferencedName]]</var>: <var>propertyNameString</var>, <var class="field">[[Strict]]</var>: <var>strict</var>, <var class="field">[[ThisValue]]</var>: <emu-const>empty</emu-const>&nbsp;}.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-new-operator">
<h1><span class="secnum">13.3.5</span> The <code>new</code> Operator</h1>
<emu-clause id="sec-new-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.3.5.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="NewExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-NewExpression">NewExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="51p618ta" id="prod-oglQ-mZC">
<emu-t>new</emu-t>
<emu-nt id="_ref_20808"><a href="ecmascript-language-expressions.html#prod-NewExpression">NewExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateNew" id="_ref_6218"><a href="ecmascript-language-expressions.html#sec-evaluatenew" class="e-user-code">EvaluateNew</a></emu-xref>(<emu-nt id="_ref_20809"><a href="ecmascript-language-expressions.html#prod-NewExpression">NewExpression</a></emu-nt>, <emu-const>empty</emu-const>).</li></ol></emu-alg>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="cfq-hbbx" id="prod-ynRwNJgH">
<emu-t>new</emu-t>
<emu-nt id="_ref_20810"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>
<emu-nt id="_ref_20811"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateNew" id="_ref_6219"><a href="ecmascript-language-expressions.html#sec-evaluatenew" class="e-user-code">EvaluateNew</a></emu-xref>(<emu-nt id="_ref_20812"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>, <emu-nt id="_ref_20813"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>).</li></ol></emu-alg>
<emu-clause id="sec-evaluatenew" type="abstract operation" aoid="EvaluateNew">
<h1><span class="secnum">13.3.5.1.1</span> EvaluateNew ( <var>constructExpr</var>, <var>arguments</var> )</h1>
<p>The abstract operation EvaluateNew takes arguments <var>constructExpr</var> (a <emu-nt id="_ref_20814"><a href="ecmascript-language-expressions.html#prod-NewExpression">NewExpression</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6220"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref> or a <emu-nt id="_ref_20815"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6221"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>) and <var>arguments</var> (<emu-const>empty</emu-const> or an <emu-nt id="_ref_20816"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt> <emu-xref href="#sec-syntactic-grammar" id="_ref_6222"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6223"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6224"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6225"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>ref</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6226"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <var>constructExpr</var>.</li><li>Let <var>constructor</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6227"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>ref</var>).</li><li>If <var>arguments</var> is <emu-const>empty</emu-const>, then<ol><li>Let <var>argList</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6228"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</li></ol></li><li>Else,<ol><li>Let <var>argList</var> be ?&nbsp;<emu-xref aoid="ArgumentListEvaluation" id="_ref_6229"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-argumentlistevaluation" class="e-user-code">ArgumentListEvaluation</a></emu-xref> of <var>arguments</var>.</li></ol></li><li>If <emu-xref aoid="IsConstructor" id="_ref_6230"><a href="abstract-operations.html#sec-isconstructor">IsConstructor</a></emu-xref>(<var>constructor</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ?&nbsp;<emu-xref aoid="Construct" id="_ref_6231"><a href="abstract-operations.html#sec-construct" class="e-user-code">Construct</a></emu-xref>(<var>constructor</var>, <var>argList</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-function-calls">
<h1><span class="secnum">13.3.6</span> Function Calls</h1>
<emu-clause id="sec-function-calls-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.3.6.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="7jj-96li" id="prod-4XjrYD2l"><emu-nt id="_ref_20817"><a href="ecmascript-language-functions-and-classes.html#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be the <emu-nt id="_ref_20818"><a href="ecmascript-language-expressions.html#prod-CallMemberExpression">CallMemberExpression</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_6232"><a href="notational-conventions.html#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_20819"><a href="ecmascript-language-functions-and-classes.html#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</li><li>Let <var>memberExpr</var> be the <emu-nt id="_ref_20820"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> of <var>expr</var>.</li><li>Let <var>arguments</var> be the <emu-nt id="_ref_20821"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt> of <var>expr</var>.</li><li>Let <var>ref</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6233"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <var>memberExpr</var>.</li><li>Let <var>func</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6234"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>ref</var>).</li><li>If <var>ref</var> is a <emu-xref href="#sec-reference-record-specification-type" id="_ref_6235"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref>, <emu-xref aoid="IsPropertyReference" id="_ref_6236"><a href="ecmascript-data-types-and-values.html#sec-ispropertyreference">IsPropertyReference</a></emu-xref>(<var>ref</var>) is <emu-val>false</emu-val>, and <var>ref</var>.<var class="field">[[ReferencedName]]</var> is <emu-val>"eval"</emu-val>, then<ol><li>If <emu-xref aoid="SameValue" id="_ref_6237"><a href="abstract-operations.html#sec-samevalue">SameValue</a></emu-xref>(<var>func</var>, <emu-xref href="#sec-eval-x" id="_ref_6238"><a href="global-object.html#sec-eval-x">%eval%</a></emu-xref>) is <emu-val>true</emu-val>, then<ol><li>Let <var>argList</var> be ?&nbsp;<emu-xref aoid="ArgumentListEvaluation" id="_ref_6239"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-argumentlistevaluation" class="e-user-code">ArgumentListEvaluation</a></emu-xref> of <var>arguments</var>.</li><li>If <var>argList</var> has no elements, return <emu-val>undefined</emu-val>.</li><li>Let <var>evalArg</var> be the first element of <var>argList</var>.</li><li>If <emu-xref aoid="IsStrict" id="_ref_6240"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20822"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>) is <emu-val>true</emu-val>, let <var>strictCaller</var> be <emu-val>true</emu-val>; else let <var>strictCaller</var> be <emu-val>false</emu-val>.</li><li id="step-callexpression-evaluation-direct-eval">Return ?&nbsp;<emu-xref aoid="PerformEval" id="_ref_6241"><a href="global-object.html#sec-performeval" class="e-user-code">PerformEval</a></emu-xref>(<var>evalArg</var>, <var>strictCaller</var>, <emu-val>true</emu-val>).</li></ol></li></ol></li><li>Let <var>thisCall</var> be this <emu-nt id="_ref_20823"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_6242"><a href="ecmascript-language-functions-and-classes.html#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisCall</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_6243"><a href="ecmascript-language-expressions.html#sec-evaluatecall" class="e-user-code">EvaluateCall</a></emu-xref>(<var>func</var>, <var>ref</var>, <var>arguments</var>, <var>tailCall</var>).</li></ol></emu-alg>
<p>A <emu-nt id="_ref_20824"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> evaluation that executes step <emu-xref href="#step-callexpression-evaluation-direct-eval" id="_ref_419"><a href="ecmascript-language-expressions.html#step-callexpression-evaluation-direct-eval">6.a.v</a></emu-xref> is a <dfn variants="direct evals" tabindex="-1">direct eval</dfn>.</p>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="qugahahu" id="prod-nikwMTuV">
<emu-nt id="_ref_20825"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>
<emu-nt id="_ref_20826"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>ref</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6244"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20827"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>func</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6245"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>ref</var>).</li><li>Let <var>thisCall</var> be this <emu-nt id="_ref_20828"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_6246"><a href="ecmascript-language-functions-and-classes.html#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisCall</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_6247"><a href="ecmascript-language-expressions.html#sec-evaluatecall" class="e-user-code">EvaluateCall</a></emu-xref>(<var>func</var>, <var>ref</var>, <emu-nt id="_ref_20829"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>, <var>tailCall</var>).</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-evaluatecall" type="abstract operation" oldids="sec-evaluatedirectcall" aoid="EvaluateCall"><span id="sec-evaluatedirectcall"></span>
<h1><span class="secnum">13.3.6.2</span> EvaluateCall ( <var>func</var>, <var>ref</var>, <var>arguments</var>, <var>tailPosition</var> )</h1>
<p>The abstract operation EvaluateCall takes arguments <var>func</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6248"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>), <var>ref</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6249"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> or a <emu-xref href="#sec-reference-record-specification-type" id="_ref_6250"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref>), <var>arguments</var> (a <emu-xref href="#sec-syntactic-grammar" id="_ref_6251"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>), and <var>tailPosition</var> (a Boolean) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6252"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6253"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6254"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>If <var>ref</var> is a <emu-xref href="#sec-reference-record-specification-type" id="_ref_6255"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref>, then<ol><li>If <emu-xref aoid="IsPropertyReference" id="_ref_6256"><a href="ecmascript-data-types-and-values.html#sec-ispropertyreference">IsPropertyReference</a></emu-xref>(<var>ref</var>) is <emu-val>true</emu-val>, then<ol><li>Let <var>thisValue</var> be <emu-xref aoid="GetThisValue" id="_ref_6257"><a href="ecmascript-data-types-and-values.html#sec-getthisvalue">GetThisValue</a></emu-xref>(<var>ref</var>).</li></ol></li><li>Else,<ol><li>Let <var>refEnv</var> be <var>ref</var>.<var class="field">[[Base]]</var>.</li><li><emu-xref href="#assert" id="_ref_6258"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>refEnv</var> is an <emu-xref href="#sec-environment-records" id="_ref_6259"><a href="executable-code-and-execution-contexts.html#sec-environment-records">Environment Record</a></emu-xref>.</li><li>Let <var>thisValue</var> be <var>refEnv</var>.<emu-xref aoid="WithBaseObject" id="_ref_6260"><a href="executable-code-and-execution-contexts.html#abstract-withbaseobject">WithBaseObject</a></emu-xref>().</li></ol></li></ol></li><li>Else,<ol><li>Let <var>thisValue</var> be <emu-val>undefined</emu-val>.</li></ol></li><li>Let <var>argList</var> be ?&nbsp;<emu-xref aoid="ArgumentListEvaluation" id="_ref_6261"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-argumentlistevaluation" class="e-user-code">ArgumentListEvaluation</a></emu-xref> of <var>arguments</var>.</li><li>If <var>func</var> <emu-xref href="#sec-object-type" id="_ref_6262"><a href="ecmascript-data-types-and-values.html#sec-object-type">is not an Object</a></emu-xref>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <emu-xref aoid="IsCallable" id="_ref_6263"><a href="abstract-operations.html#sec-iscallable">IsCallable</a></emu-xref>(<var>func</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>tailPosition</var> is <emu-val>true</emu-val>, perform <emu-xref aoid="PrepareForTailCall" id="_ref_6264"><a href="ecmascript-language-functions-and-classes.html#sec-preparefortailcall">PrepareForTailCall</a></emu-xref>().</li><li>Return ?&nbsp;<emu-xref aoid="Call" id="_ref_6265"><a href="abstract-operations.html#sec-call" class="e-user-code">Call</a></emu-xref>(<var>func</var>, <var>thisValue</var>, <var>argList</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-super-keyword">
<h1><span class="secnum">13.3.7</span> The <code>super</code> Keyword</h1>
<emu-clause id="sec-super-keyword-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.3.7.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="SuperProperty" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-SuperProperty">SuperProperty</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="tpjzdyqv" id="prod-AopplWA-">
<emu-t>super</emu-t>
<emu-t>[</emu-t>
<emu-nt id="_ref_20830"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>env</var> be <emu-xref aoid="GetThisEnvironment" id="_ref_6266"><a href="executable-code-and-execution-contexts.html#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li>Let <var>actualThis</var> be ?&nbsp;<var>env</var>.<emu-xref aoid="GetThisBinding" id="_ref_6267"><a href="executable-code-and-execution-contexts.html#abstract-getthisbinding">GetThisBinding</a></emu-xref>().</li><li>Let <var>propertyNameReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6268"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20831"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>propertyNameValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6269"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>propertyNameReference</var>).</li><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6270"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20832"><a href="ecmascript-language-expressions.html#prod-SuperProperty">SuperProperty</a></emu-nt>).</li><li>NOTE: In most cases, <emu-xref aoid="ToPropertyKey" id="_ref_6271"><a href="abstract-operations.html#sec-topropertykey">ToPropertyKey</a></emu-xref> will be performed on <var>propertyNameValue</var> immediately after this step. However, in the case of <code>super[b] = c</code>, it will not be performed until after evaluation of <code>c</code>.</li><li>Return <emu-xref aoid="MakeSuperPropertyReference" id="_ref_6272"><a href="ecmascript-language-expressions.html#sec-makesuperpropertyreference">MakeSuperPropertyReference</a></emu-xref>(<var>actualThis</var>, <var>propertyNameValue</var>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="SuperProperty" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-SuperProperty">SuperProperty</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="9pdsslwb" id="prod-YiE5fXTa">
<emu-t>super</emu-t>
<emu-t>.</emu-t>
<emu-nt id="_ref_20833"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>env</var> be <emu-xref aoid="GetThisEnvironment" id="_ref_6273"><a href="executable-code-and-execution-contexts.html#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li>Let <var>actualThis</var> be ?&nbsp;<var>env</var>.<emu-xref aoid="GetThisBinding" id="_ref_6274"><a href="executable-code-and-execution-contexts.html#abstract-getthisbinding">GetThisBinding</a></emu-xref>().</li><li>Let <var>propertyKey</var> be the <emu-xref aoid="StringValue" id="_ref_6275"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20834"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>.</li><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6276"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20835"><a href="ecmascript-language-expressions.html#prod-SuperProperty">SuperProperty</a></emu-nt>).</li><li>Return <emu-xref aoid="MakeSuperPropertyReference" id="_ref_6277"><a href="ecmascript-language-expressions.html#sec-makesuperpropertyreference">MakeSuperPropertyReference</a></emu-xref>(<var>actualThis</var>, <var>propertyKey</var>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="SuperCall" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-SuperCall">SuperCall</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="qdmdlzzo" id="prod--j5ruhLQ">
<emu-t>super</emu-t>
<emu-nt id="_ref_20836"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>newTarget</var> be <emu-xref aoid="GetNewTarget" id="_ref_6278"><a href="executable-code-and-execution-contexts.html#sec-getnewtarget">GetNewTarget</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_6279"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>newTarget</var> is a <emu-xref href="#constructor" id="_ref_6280"><a href="ecmascript-data-types-and-values.html#constructor">constructor</a></emu-xref>.</li><li>Let <var>func</var> be <emu-xref aoid="GetSuperConstructor" id="_ref_6281"><a href="ecmascript-language-expressions.html#sec-getsuperconstructor">GetSuperConstructor</a></emu-xref>().</li><li>Let <var>argList</var> be ?&nbsp;<emu-xref aoid="ArgumentListEvaluation" id="_ref_6282"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-argumentlistevaluation" class="e-user-code">ArgumentListEvaluation</a></emu-xref> of <emu-nt id="_ref_20837"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>.</li><li>If <emu-xref aoid="IsConstructor" id="_ref_6283"><a href="abstract-operations.html#sec-isconstructor">IsConstructor</a></emu-xref>(<var>func</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>result</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_6284"><a href="abstract-operations.html#sec-construct" class="e-user-code">Construct</a></emu-xref>(<var>func</var>, <var>argList</var>, <var>newTarget</var>).</li><li>Let <var>thisER</var> be <emu-xref aoid="GetThisEnvironment" id="_ref_6285"><a href="executable-code-and-execution-contexts.html#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_6286"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>thisER</var> is a <emu-xref href="#sec-function-environment-records" id="_ref_6287"><a href="executable-code-and-execution-contexts.html#sec-function-environment-records">Function Environment Record</a></emu-xref>.</li><li>Perform ?&nbsp;<emu-xref aoid="BindThisValue" id="_ref_6288"><a href="executable-code-and-execution-contexts.html#sec-bindthisvalue">BindThisValue</a></emu-xref>(<var>thisER</var>, <var>result</var>).</li><li>Let <var>F</var> be <var>thisER</var>.<var class="field">[[FunctionObject]]</var>.</li><li><emu-xref href="#assert" id="_ref_6289"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>F</var> is an ECMAScript <emu-xref href="#function-object" id="_ref_6290"><a href="ecmascript-data-types-and-values.html#function-object">function object</a></emu-xref>.</li><li>Perform ?&nbsp;<emu-xref aoid="InitializeInstanceElements" id="_ref_6291"><a href="abstract-operations.html#sec-initializeinstanceelements" class="e-user-code">InitializeInstanceElements</a></emu-xref>(<var>result</var>, <var>F</var>).</li><li>Return <var>result</var>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-getsuperconstructor" type="abstract operation" aoid="GetSuperConstructor">
<h1><span class="secnum">13.3.7.2</span> GetSuperConstructor ( )</h1>
<p>The abstract operation GetSuperConstructor takes no arguments and returns an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6292"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>envRec</var> be <emu-xref aoid="GetThisEnvironment" id="_ref_6293"><a href="executable-code-and-execution-contexts.html#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_6294"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>envRec</var> is a <emu-xref href="#sec-function-environment-records" id="_ref_6295"><a href="executable-code-and-execution-contexts.html#sec-function-environment-records">Function Environment Record</a></emu-xref>.</li><li>Let <var>activeFunction</var> be <var>envRec</var>.<var class="field">[[FunctionObject]]</var>.</li><li><emu-xref href="#assert" id="_ref_6296"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>activeFunction</var> is an ECMAScript <emu-xref href="#function-object" id="_ref_6297"><a href="ecmascript-data-types-and-values.html#function-object">function object</a></emu-xref>.</li><li>Let <var>superConstructor</var> be !&nbsp;<var>activeFunction</var>.<var class="field">[[GetPrototypeOf]]</var>().</li><li>Return <var>superConstructor</var>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-makesuperpropertyreference" type="abstract operation" aoid="MakeSuperPropertyReference">
<h1><span class="secnum">13.3.7.3</span> MakeSuperPropertyReference ( <var>actualThis</var>, <var>propertyKey</var>, <var>strict</var> )</h1>
<p>The abstract operation MakeSuperPropertyReference takes arguments <var>actualThis</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6298"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>), <var>propertyKey</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6299"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>), and <var>strict</var> (a Boolean) and returns a <emu-xref href="#super-reference-record" id="_ref_6300"><a href="ecmascript-data-types-and-values.html#super-reference-record">Super Reference Record</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>env</var> be <emu-xref aoid="GetThisEnvironment" id="_ref_6301"><a href="executable-code-and-execution-contexts.html#sec-getthisenvironment">GetThisEnvironment</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_6302"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>env</var>.<emu-xref aoid="HasSuperBinding" id="_ref_6303"><a href="executable-code-and-execution-contexts.html#abstract-hassuperbinding">HasSuperBinding</a></emu-xref>() is <emu-val>true</emu-val>.</li><li><emu-xref href="#assert" id="_ref_6304"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>env</var> is a <emu-xref href="#sec-function-environment-records" id="_ref_6305"><a href="executable-code-and-execution-contexts.html#sec-function-environment-records">Function Environment Record</a></emu-xref>.</li><li>Let <var>baseValue</var> be <emu-xref aoid="GetSuperBase" id="_ref_6306"><a href="executable-code-and-execution-contexts.html#sec-getsuperbase">GetSuperBase</a></emu-xref>(<var>env</var>).</li><li>Return the <emu-xref href="#sec-reference-record-specification-type" id="_ref_6307"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref> { <var class="field">[[Base]]</var>: <var>baseValue</var>, <var class="field">[[ReferencedName]]</var>: <var>propertyKey</var>, <var class="field">[[Strict]]</var>: <var>strict</var>, <var class="field">[[ThisValue]]</var>: <var>actualThis</var>&nbsp;}.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-argument-lists">
<h1><span class="secnum">13.3.8</span> Argument Lists</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The evaluation of an argument list produces a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6308"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> of values.</p>
</div></emu-note>
<emu-clause id="sec-runtime-semantics-argumentlistevaluation" oldids="sec-template-literals-runtime-semantics-argumentlistevaluation,sec-argument-lists-runtime-semantics-argumentlistevaluation" type="sdo" aoid="ArgumentListEvaluation"><span id="sec-argument-lists-runtime-semantics-argumentlistevaluation"></span><span id="sec-template-literals-runtime-semantics-argumentlistevaluation"></span>
<h1><span class="secnum">13.3.8.1</span> Runtime Semantics: ArgumentListEvaluation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6309"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> ArgumentListEvaluation takes no arguments and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6310"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6311"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-xref href="#sec-ecmascript-language-types" id="_ref_6312"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language values</a></emu-xref> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6313"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="Arguments" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="eormm5tk" id="prod-qXYYcvIK">
<emu-t>(</emu-t>
<emu-t>)</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6314"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ArgumentList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="1px9pijq" id="prod-6LIBrAp-"><emu-nt id="_ref_20838"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>ref</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6315"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20839"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>arg</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6316"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>ref</var>).</li><li>Return « <var>arg</var>&nbsp;».</li></ol></emu-alg>
<emu-grammar><emu-production name="ArgumentList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="w7ifpmpd" id="prod-9NFeGQ82">
<emu-t>...</emu-t>
<emu-nt id="_ref_20840"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>list</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6317"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Let <var>spreadRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6318"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20841"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>spreadObj</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6319"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>spreadRef</var>).</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6320"><a href="abstract-operations.html#sec-getiterator" class="e-user-code">GetIterator</a></emu-xref>(<var>spreadObj</var>, <emu-const>sync</emu-const>).</li><li>Repeat,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStepValue" id="_ref_6321"><a href="abstract-operations.html#sec-iteratorstepvalue" class="e-user-code">IteratorStepValue</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-const>done</emu-const>, return <var>list</var>.</li><li>Append <var>next</var> to <var>list</var>.</li></ol></li></ol></emu-alg>
<emu-grammar><emu-production name="ArgumentList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="f_i_7oqe" id="prod-avUGM8aa">
<emu-nt id="_ref_20842"><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt id="_ref_20843"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>precedingArgs</var> be ?&nbsp;<emu-xref aoid="ArgumentListEvaluation" id="_ref_6322"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-argumentlistevaluation" class="e-user-code">ArgumentListEvaluation</a></emu-xref> of <emu-nt id="_ref_20844"><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a></emu-nt>.</li><li>Let <var>ref</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6323"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20845"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>arg</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6324"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>ref</var>).</li><li>Return the <emu-xref href="#list-concatenation" id="_ref_6325"><a href="ecmascript-data-types-and-values.html#list-concatenation">list-concatenation</a></emu-xref> of <var>precedingArgs</var> and « <var>arg</var>&nbsp;».</li></ol></emu-alg>
<emu-grammar><emu-production name="ArgumentList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="z4rq-va3" id="prod-Au9Wi9yT">
<emu-nt id="_ref_20846"><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a></emu-nt>
<emu-t>,</emu-t>
<emu-t>...</emu-t>
<emu-nt id="_ref_20847"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>precedingArgs</var> be ?&nbsp;<emu-xref aoid="ArgumentListEvaluation" id="_ref_6326"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-argumentlistevaluation" class="e-user-code">ArgumentListEvaluation</a></emu-xref> of <emu-nt id="_ref_20848"><a href="ecmascript-language-expressions.html#prod-ArgumentList">ArgumentList</a></emu-nt>.</li><li>Let <var>spreadRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6327"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20849"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6328"><a href="abstract-operations.html#sec-getiterator" class="e-user-code">GetIterator</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6329"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>spreadRef</var>), <emu-const>sync</emu-const>).</li><li>Repeat,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStepValue" id="_ref_6330"><a href="abstract-operations.html#sec-iteratorstepvalue" class="e-user-code">IteratorStepValue</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is <emu-const>done</emu-const>, return <var>precedingArgs</var>.</li><li>Append <var>next</var> to <var>precedingArgs</var>.</li></ol></li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateLiteral" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="e_otk8es" id="prod-EUsfaoKE"><emu-nt id="_ref_20850"><a href="ecmascript-language-lexical-grammar.html#prod-NoSubstitutionTemplate">NoSubstitutionTemplate</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>templateLiteral</var> be this <emu-nt id="_ref_20851"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>.</li><li>Let <var>siteObj</var> be <emu-xref aoid="GetTemplateObject" id="_ref_6331"><a href="ecmascript-language-expressions.html#sec-gettemplateobject">GetTemplateObject</a></emu-xref>(<var>templateLiteral</var>).</li><li>Return « <var>siteObj</var>&nbsp;».</li></ol></emu-alg>
<emu-grammar><emu-production name="TemplateLiteral" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="haut9ebi" id="prod-_obYKRXG"><emu-nt id="_ref_20852"><a href="ecmascript-language-expressions.html#prod-SubstitutionTemplate">SubstitutionTemplate</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>templateLiteral</var> be this <emu-nt id="_ref_20853"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>.</li><li>Let <var>siteObj</var> be <emu-xref aoid="GetTemplateObject" id="_ref_6332"><a href="ecmascript-language-expressions.html#sec-gettemplateobject">GetTemplateObject</a></emu-xref>(<var>templateLiteral</var>).</li><li>Let <var>remaining</var> be ?&nbsp;<emu-xref aoid="ArgumentListEvaluation" id="_ref_6333"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-argumentlistevaluation" class="e-user-code">ArgumentListEvaluation</a></emu-xref> of <emu-nt id="_ref_20854"><a href="ecmascript-language-expressions.html#prod-SubstitutionTemplate">SubstitutionTemplate</a></emu-nt>.</li><li>Return the <emu-xref href="#list-concatenation" id="_ref_6334"><a href="ecmascript-data-types-and-values.html#list-concatenation">list-concatenation</a></emu-xref> of « <var>siteObj</var>&nbsp;» and <var>remaining</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="SubstitutionTemplate" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-SubstitutionTemplate">SubstitutionTemplate</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vpxmqc6d" id="prod-RX4K7HKv">
<emu-nt id="_ref_20855"><a href="ecmascript-language-lexical-grammar.html#prod-TemplateHead">TemplateHead</a></emu-nt>
<emu-nt id="_ref_20856"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-nt id="_ref_20857"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>firstSubRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6335"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20858"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>.</li><li>Let <var>firstSub</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6336"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>firstSubRef</var>).</li><li>Let <var>restSub</var> be ?&nbsp;<emu-xref aoid="SubstitutionEvaluation" id="_ref_6337"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-substitutionevaluation" class="e-user-code">SubstitutionEvaluation</a></emu-xref> of <emu-nt id="_ref_20859"><a href="ecmascript-language-expressions.html#prod-TemplateSpans">TemplateSpans</a></emu-nt>.</li><li><emu-xref href="#assert" id="_ref_6338"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>restSub</var> is a possibly empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6339"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return the <emu-xref href="#list-concatenation" id="_ref_6340"><a href="ecmascript-data-types-and-values.html#list-concatenation">list-concatenation</a></emu-xref> of « <var>firstSub</var>&nbsp;» and <var>restSub</var>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-optional-chains">
<h1><span class="secnum">13.3.9</span> Optional Chains</h1>
<emu-note><span class="note">Note</span><div class="note-contents">An optional chain is a chain of one or more property accesses and function calls, the first of which begins with the token <code>?.</code>.</div></emu-note>
<emu-clause id="sec-optional-chaining-evaluation" type="sdo">
<h1><span class="secnum">13.3.9.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="OptionalExpression">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalExpression">OptionalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="tne-ixmh" id="prod--_aqugGj">
<emu-nt id="_ref_20860"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>
<emu-nt id="_ref_20861"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6341"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20862"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6342"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>If <var>baseValue</var> is either <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, then<ol><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="ChainEvaluation" id="_ref_6343"><a href="ecmascript-language-expressions.html#sec-optional-chaining-chain-evaluation" class="e-user-code">ChainEvaluation</a></emu-xref> of <emu-nt id="_ref_20863"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> with arguments <var>baseValue</var> and <var>baseReference</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="OptionalExpression">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalExpression">OptionalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vah6zjkb" id="prod-k1PrC9LR">
<emu-nt id="_ref_20864"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>
<emu-nt id="_ref_20865"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6344"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20866"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6345"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>If <var>baseValue</var> is either <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, then<ol><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="ChainEvaluation" id="_ref_6346"><a href="ecmascript-language-expressions.html#sec-optional-chaining-chain-evaluation" class="e-user-code">ChainEvaluation</a></emu-xref> of <emu-nt id="_ref_20867"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> with arguments <var>baseValue</var> and <var>baseReference</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="OptionalExpression">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalExpression">OptionalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="m-2pf2bd" id="prod-TDZnNZ1K">
<emu-nt id="_ref_20868"><a href="ecmascript-language-expressions.html#prod-OptionalExpression">OptionalExpression</a></emu-nt>
<emu-nt id="_ref_20869"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>baseReference</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6347"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20870"><a href="ecmascript-language-expressions.html#prod-OptionalExpression">OptionalExpression</a></emu-nt>.</li><li>Let <var>baseValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6348"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>baseReference</var>).</li><li>If <var>baseValue</var> is either <emu-val>undefined</emu-val> or <emu-val>null</emu-val>, then<ol><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="ChainEvaluation" id="_ref_6349"><a href="ecmascript-language-expressions.html#sec-optional-chaining-chain-evaluation" class="e-user-code">ChainEvaluation</a></emu-xref> of <emu-nt id="_ref_20871"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> with arguments <var>baseValue</var> and <var>baseReference</var>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-optional-chaining-chain-evaluation" type="sdo" aoid="ChainEvaluation">
<h1><span class="secnum">13.3.9.2</span> Runtime Semantics: ChainEvaluation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6350"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> ChainEvaluation takes arguments <var>baseValue</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6351"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>) and <var>baseReference</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6352"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> or a <emu-xref href="#sec-reference-record-specification-type" id="_ref_6353"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6354"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> either an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6355"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref> or a <emu-xref href="#sec-reference-record-specification-type" id="_ref_6356"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref>, or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6357"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="OptionalChain" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ynxeowdb" id="prod-1C3YSxR_">
<emu-t>?.</emu-t>
<emu-nt id="_ref_20872"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>thisChain</var> be this <emu-nt id="_ref_20873"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_6358"><a href="ecmascript-language-functions-and-classes.html#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisChain</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_6359"><a href="ecmascript-language-expressions.html#sec-evaluatecall" class="e-user-code">EvaluateCall</a></emu-xref>(<var>baseValue</var>, <var>baseReference</var>, <emu-nt id="_ref_20874"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>, <var>tailCall</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="OptionalChain" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="kktyttw7" id="prod-w5u7jzLu">
<emu-t>?.</emu-t>
<emu-t>[</emu-t>
<emu-nt id="_ref_20875"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6360"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20876"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluatePropertyAccessWithExpressionKey" id="_ref_6361"><a href="ecmascript-language-expressions.html#sec-evaluate-property-access-with-expression-key" class="e-user-code">EvaluatePropertyAccessWithExpressionKey</a></emu-xref>(<var>baseValue</var>, <emu-nt id="_ref_20877"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="OptionalChain" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="w-4ch2am" id="prod-9T4kB2jq">
<emu-t>?.</emu-t>
<emu-nt id="_ref_20878"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6362"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20879"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>).</li><li>Return <emu-xref aoid="EvaluatePropertyAccessWithIdentifierKey" id="_ref_6363"><a href="ecmascript-language-expressions.html#sec-evaluate-property-access-with-identifier-key">EvaluatePropertyAccessWithIdentifierKey</a></emu-xref>(<var>baseValue</var>, <emu-nt id="_ref_20880"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="OptionalChain" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0xlnjlpz" id="prod-JeRaAt5H">
<emu-t>?.</emu-t>
<emu-nt id="_ref_20881"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>fieldNameString</var> be the <emu-xref aoid="StringValue" id="_ref_6364"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20882"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>.</li><li>Return <emu-xref aoid="MakePrivateReference" id="_ref_6365"><a href="ecmascript-data-types-and-values.html#sec-makeprivatereference">MakePrivateReference</a></emu-xref>(<var>baseValue</var>, <var>fieldNameString</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="OptionalChain" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="eogoekck" id="prod-kAXkNcIE">
<emu-nt id="_ref_20883"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>
<emu-nt id="_ref_20884"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>optionalChain</var> be <emu-nt id="_ref_20885"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>.</li><li>Let <var>newReference</var> be ?&nbsp;<emu-xref aoid="ChainEvaluation" id="_ref_6366"><a href="ecmascript-language-expressions.html#sec-optional-chaining-chain-evaluation" class="e-user-code">ChainEvaluation</a></emu-xref> of <var>optionalChain</var> with arguments <var>baseValue</var> and <var>baseReference</var>.</li><li>Let <var>newValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6367"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>newReference</var>).</li><li>Let <var>thisChain</var> be this <emu-nt id="_ref_20886"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_6368"><a href="ecmascript-language-functions-and-classes.html#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisChain</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_6369"><a href="ecmascript-language-expressions.html#sec-evaluatecall" class="e-user-code">EvaluateCall</a></emu-xref>(<var>newValue</var>, <var>newReference</var>, <emu-nt id="_ref_20887"><a href="ecmascript-language-expressions.html#prod-Arguments">Arguments</a></emu-nt>, <var>tailCall</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="OptionalChain" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="jgl-kve-" id="prod-PNgnxyKa">
<emu-nt id="_ref_20888"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>
<emu-t>[</emu-t>
<emu-nt id="_ref_20889"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>optionalChain</var> be <emu-nt id="_ref_20890"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>.</li><li>Let <var>newReference</var> be ?&nbsp;<emu-xref aoid="ChainEvaluation" id="_ref_6370"><a href="ecmascript-language-expressions.html#sec-optional-chaining-chain-evaluation" class="e-user-code">ChainEvaluation</a></emu-xref> of <var>optionalChain</var> with arguments <var>baseValue</var> and <var>baseReference</var>.</li><li>Let <var>newValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6371"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>newReference</var>).</li><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6372"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20891"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluatePropertyAccessWithExpressionKey" id="_ref_6373"><a href="ecmascript-language-expressions.html#sec-evaluate-property-access-with-expression-key" class="e-user-code">EvaluatePropertyAccessWithExpressionKey</a></emu-xref>(<var>newValue</var>, <emu-nt id="_ref_20892"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="OptionalChain" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="lf2imwfr" id="prod-Il7WrbnC">
<emu-nt id="_ref_20893"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20894"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>optionalChain</var> be <emu-nt id="_ref_20895"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>.</li><li>Let <var>newReference</var> be ?&nbsp;<emu-xref aoid="ChainEvaluation" id="_ref_6374"><a href="ecmascript-language-expressions.html#sec-optional-chaining-chain-evaluation" class="e-user-code">ChainEvaluation</a></emu-xref> of <var>optionalChain</var> with arguments <var>baseValue</var> and <var>baseReference</var>.</li><li>Let <var>newValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6375"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>newReference</var>).</li><li>Let <var>strict</var> be <emu-xref aoid="IsStrict" id="_ref_6376"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(this <emu-nt id="_ref_20896"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>).</li><li>Return <emu-xref aoid="EvaluatePropertyAccessWithIdentifierKey" id="_ref_6377"><a href="ecmascript-language-expressions.html#sec-evaluate-property-access-with-identifier-key">EvaluatePropertyAccessWithIdentifierKey</a></emu-xref>(<var>newValue</var>, <emu-nt id="_ref_20897"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt>, <var>strict</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="OptionalChain" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="dnp-fbqk" id="prod-5tv-oPv9">
<emu-nt id="_ref_20898"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20899"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>optionalChain</var> be <emu-nt id="_ref_20900"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>.</li><li>Let <var>newReference</var> be ?&nbsp;<emu-xref aoid="ChainEvaluation" id="_ref_6378"><a href="ecmascript-language-expressions.html#sec-optional-chaining-chain-evaluation" class="e-user-code">ChainEvaluation</a></emu-xref> of <var>optionalChain</var> with arguments <var>baseValue</var> and <var>baseReference</var>.</li><li>Let <var>newValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6379"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>newReference</var>).</li><li>Let <var>fieldNameString</var> be the <emu-xref aoid="StringValue" id="_ref_6380"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_20901"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>.</li><li>Return <emu-xref aoid="MakePrivateReference" id="_ref_6381"><a href="ecmascript-data-types-and-values.html#sec-makeprivatereference">MakePrivateReference</a></emu-xref>(<var>newValue</var>, <var>fieldNameString</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-import-calls">
<h1><span class="secnum">13.3.10</span> Import Calls</h1>
<emu-clause id="sec-import-call-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.3.10.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ImportCall" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ImportCall">ImportCall</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="rksumt7f" id="prod-DuEmEibb">
<emu-t>import</emu-t>
<emu-t>(</emu-t>
<emu-nt id="_ref_20902"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
<emu-t optional="">,<emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-t>
<emu-t>)</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateImportCall" id="_ref_6382"><a href="ecmascript-language-expressions.html#sec-evaluate-import-call" class="e-user-code">EvaluateImportCall</a></emu-xref>(<emu-nt id="_ref_20903"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>).</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportCall" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ImportCall">ImportCall</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="7jkmc6eq" id="prod-OGjeE4Nc">
<emu-t>import</emu-t>
<emu-t>(</emu-t>
<emu-nt id="_ref_20904"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt id="_ref_20905"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
<emu-t optional="">,<emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-t>
<emu-t>)</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateImportCall" id="_ref_6383"><a href="ecmascript-language-expressions.html#sec-evaluate-import-call" class="e-user-code">EvaluateImportCall</a></emu-xref>(the first <emu-nt id="_ref_20906"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>, the second <emu-nt id="_ref_20907"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>).</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-evaluate-import-call" type="abstract operation" aoid="EvaluateImportCall">
<h1><span class="secnum">13.3.10.2</span> EvaluateImportCall ( <var>specifierExpression</var> [ , <var>optionsExpression</var> ] )</h1>
<p>The abstract operation EvaluateImportCall takes argument <var>specifierExpression</var> (a <emu-xref href="#sec-syntactic-grammar" id="_ref_6384"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>) and optional argument <var>optionsExpression</var> (a <emu-xref href="#sec-syntactic-grammar" id="_ref_6385"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6386"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> a Promise or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6387"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>referrer</var> be <emu-xref aoid="GetActiveScriptOrModule" id="_ref_6388"><a href="executable-code-and-execution-contexts.html#sec-getactivescriptormodule">GetActiveScriptOrModule</a></emu-xref>().</li><li>If <var>referrer</var> is <emu-val>null</emu-val>, set <var>referrer</var> to <emu-xref href="#current-realm" id="_ref_6389"><a href="executable-code-and-execution-contexts.html#current-realm">the current Realm Record</a></emu-xref>.</li><li>Let <var>specifierRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6390"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <var>specifierExpression</var>.</li><li>Let <var>specifier</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6391"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>specifierRef</var>).</li><li>If <var>optionsExpression</var> is present, then<ol><li>Let <var>optionsRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6392"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <var>optionsExpression</var>.</li><li>Let <var>options</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6393"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>optionsRef</var>).</li></ol></li><li>Else,<ol><li>Let <var>options</var> be <emu-val>undefined</emu-val>.</li></ol></li><li>Let <var>promiseCapability</var> be !&nbsp;<emu-xref aoid="NewPromiseCapability" id="_ref_6394"><a href="control-abstraction-objects.html#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<emu-xref href="#sec-promise-constructor" id="_ref_6395"><a href="control-abstraction-objects.html#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>Let <var>specifierString</var> be <emu-xref aoid="Completion" id="_ref_6396"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="ToString" id="_ref_6397"><a href="abstract-operations.html#sec-tostring" class="e-user-code">ToString</a></emu-xref>(<var>specifier</var>)).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_6398"><a href="control-abstraction-objects.html#sec-ifabruptrejectpromise" class="e-user-code">IfAbruptRejectPromise</a></emu-xref>(<var>specifierString</var>, <var>promiseCapability</var>).</li><li>Let <var>attributes</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6399"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>If <var>options</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <var>options</var> <emu-xref href="#sec-object-type" id="_ref_6400"><a href="ecmascript-data-types-and-values.html#sec-object-type">is not an Object</a></emu-xref>, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_6401"><a href="abstract-operations.html#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.<var class="field">[[Reject]]</var>, <emu-val>undefined</emu-val>, « a newly created <emu-val>TypeError</emu-val> object&nbsp;»).</li><li>Return <var>promiseCapability</var>.<var class="field">[[Promise]]</var>.</li></ol></li><li>Let <var>attributesObj</var> be <emu-xref aoid="Completion" id="_ref_6402"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="Get" id="_ref_6403"><a href="abstract-operations.html#sec-get-o-p" class="e-user-code">Get</a></emu-xref>(<var>options</var>, <emu-val>"with"</emu-val>)).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_6404"><a href="control-abstraction-objects.html#sec-ifabruptrejectpromise" class="e-user-code">IfAbruptRejectPromise</a></emu-xref>(<var>attributesObj</var>, <var>promiseCapability</var>).</li><li>If <var>attributesObj</var> is not <emu-val>undefined</emu-val>, then<ol><li>If <var>attributesObj</var> <emu-xref href="#sec-object-type" id="_ref_6405"><a href="ecmascript-data-types-and-values.html#sec-object-type">is not an Object</a></emu-xref>, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_6406"><a href="abstract-operations.html#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.<var class="field">[[Reject]]</var>, <emu-val>undefined</emu-val>, « a newly created <emu-val>TypeError</emu-val> object&nbsp;»).</li><li>Return <var>promiseCapability</var>.<var class="field">[[Promise]]</var>.</li></ol></li><li>Let <var>entries</var> be <emu-xref aoid="Completion" id="_ref_6407"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="EnumerableOwnProperties" id="_ref_6408"><a href="abstract-operations.html#sec-enumerableownproperties" class="e-user-code">EnumerableOwnProperties</a></emu-xref>(<var>attributesObj</var>, <emu-const>key+value</emu-const>)).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_6409"><a href="control-abstraction-objects.html#sec-ifabruptrejectpromise" class="e-user-code">IfAbruptRejectPromise</a></emu-xref>(<var>entries</var>, <var>promiseCapability</var>).</li><li>For each element <var>entry</var> of <var>entries</var>, do<ol><li>Let <var>key</var> be !&nbsp;<emu-xref aoid="Get" id="_ref_6410"><a href="abstract-operations.html#sec-get-o-p">Get</a></emu-xref>(<var>entry</var>, <emu-val>"0"</emu-val>).</li><li>Let <var>value</var> be !&nbsp;<emu-xref aoid="Get" id="_ref_6411"><a href="abstract-operations.html#sec-get-o-p">Get</a></emu-xref>(<var>entry</var>, <emu-val>"1"</emu-val>).</li><li>If <var>key</var> <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6412"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-string-type">is a String</a></emu-xref>, then<ol><li>If <var>value</var> <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6413"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-string-type">is not a String</a></emu-xref>, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_6414"><a href="abstract-operations.html#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.<var class="field">[[Reject]]</var>, <emu-val>undefined</emu-val>, « a newly created <emu-val>TypeError</emu-val> object&nbsp;»).</li><li>Return <var>promiseCapability</var>.<var class="field">[[Promise]]</var>.</li></ol></li><li>Append the <emu-xref href="#importattribute-record" id="_ref_6415"><a href="ecmascript-language-scripts-and-modules.html#importattribute-record">ImportAttribute Record</a></emu-xref> { <var class="field">[[Key]]</var>: <var>key</var>, <var class="field">[[Value]]</var>: <var>value</var>&nbsp;} to <var>attributes</var>.</li></ol></li></ol></li></ol></li><li>If <emu-xref aoid="AllImportAttributesSupported" id="_ref_6416"><a href="ecmascript-language-scripts-and-modules.html#sec-AllImportAttributesSupported">AllImportAttributesSupported</a></emu-xref>(<var>attributes</var>) is <emu-val>false</emu-val>, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_6417"><a href="abstract-operations.html#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.<var class="field">[[Reject]]</var>, <emu-val>undefined</emu-val>, « a newly created <emu-val>TypeError</emu-val> object&nbsp;»).</li><li>Return <var>promiseCapability</var>.<var class="field">[[Promise]]</var>.</li></ol></li><li>Sort <var>attributes</var> according to the lexicographic order of their <var class="field">[[Key]]</var> field, treating the value of each such field as a sequence of UTF-16 code unit values. NOTE: This sorting is observable only in that <emu-xref href="#host" id="_ref_6418"><a href="overview.html#host">hosts</a></emu-xref> are prohibited from changing behaviour based on the order in which attributes are enumerated.</li></ol></li><li>Let <var>moduleRequest</var> be a new <emu-xref href="#modulerequest-record" id="_ref_6419"><a href="ecmascript-language-scripts-and-modules.html#modulerequest-record">ModuleRequest Record</a></emu-xref> { <var class="field">[[Specifier]]</var>: <var>specifierString</var>, <var class="field">[[Attributes]]</var>: <var>attributes</var>&nbsp;}.</li><li>Perform <emu-xref aoid="HostLoadImportedModule" id="_ref_6420"><a href="ecmascript-language-scripts-and-modules.html#sec-HostLoadImportedModule">HostLoadImportedModule</a></emu-xref>(<var>referrer</var>, <var>moduleRequest</var>, <emu-const>empty</emu-const>, <var>promiseCapability</var>).</li><li>Return <var>promiseCapability</var>.<var class="field">[[Promise]]</var>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-ContinueDynamicImport" type="abstract operation" aoid="ContinueDynamicImport">
<h1><span class="secnum">13.3.10.3</span> ContinueDynamicImport ( <var>promiseCapability</var>, <var>moduleCompletion</var> )</h1>
<p>The abstract operation ContinueDynamicImport takes arguments <var>promiseCapability</var> (a <emu-xref href="#sec-promisecapability-records" id="_ref_6421"><a href="control-abstraction-objects.html#sec-promisecapability-records">PromiseCapability Record</a></emu-xref>) and <var>moduleCompletion</var> (either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6422"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> a <emu-xref href="#sec-abstract-module-records" id="_ref_6423"><a href="ecmascript-language-scripts-and-modules.html#sec-abstract-module-records">Module Record</a></emu-xref> or a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6424"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">throw completion</a></emu-xref>) and returns <emu-const>unused</emu-const>. It completes the process of a dynamic import originally started by an <emu-xref href="#sec-import-calls" id="_ref_420"><a href="ecmascript-language-expressions.html#sec-import-calls"><code>import()</code></a></emu-xref> call, resolving or rejecting the promise returned by that call as appropriate. It performs the following steps when called:</p>
<emu-alg><ol><li>If <var>moduleCompletion</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6425"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_6426"><a href="abstract-operations.html#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.<var class="field">[[Reject]]</var>, <emu-val>undefined</emu-val>, « <var>moduleCompletion</var>.<var class="field">[[Value]]</var>&nbsp;»).</li><li>Return <emu-const>unused</emu-const>.</li></ol></li><li>Let <var>module</var> be <var>moduleCompletion</var>.<var class="field">[[Value]]</var>.</li><li>Let <var>loadPromise</var> be <var>module</var>.<emu-xref aoid="LoadRequestedModules" id="_ref_6427"><a href="ecmascript-language-scripts-and-modules.html#abstract-loadrequestedmodules">LoadRequestedModules</a></emu-xref>().</li><li>Let <var>rejectedClosure</var> be a new <emu-xref href="#sec-abstract-closure" id="_ref_6428"><a href="ecmascript-data-types-and-values.html#sec-abstract-closure">Abstract Closure</a></emu-xref> with parameters (<var>reason</var>) that captures <var>promiseCapability</var> and performs the following steps when called:<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_6429"><a href="abstract-operations.html#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.<var class="field">[[Reject]]</var>, <emu-val>undefined</emu-val>, « <var>reason</var>&nbsp;»).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_6430"><a href="ecmascript-data-types-and-values.html#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Let <var>onRejected</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_6431"><a href="ordinary-and-exotic-objects-behaviours.html#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>rejectedClosure</var>, 1, <emu-val>""</emu-val>, «&nbsp;»).</li><li>Let <var>linkAndEvaluateClosure</var> be a new <emu-xref href="#sec-abstract-closure" id="_ref_6432"><a href="ecmascript-data-types-and-values.html#sec-abstract-closure">Abstract Closure</a></emu-xref> with no parameters that captures <var>module</var>, <var>promiseCapability</var>, and <var>onRejected</var> and performs the following steps when called:<ol><li>Let <var>link</var> be <emu-xref aoid="Completion" id="_ref_6433"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<var>module</var>.<emu-xref aoid="Link" id="_ref_6434"><a href="ecmascript-language-scripts-and-modules.html#abstract-link">Link</a></emu-xref>()).</li><li>If <var>link</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6435"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_6436"><a href="abstract-operations.html#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.<var class="field">[[Reject]]</var>, <emu-val>undefined</emu-val>, « <var>link</var>.<var class="field">[[Value]]</var>&nbsp;»).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_6437"><a href="ecmascript-data-types-and-values.html#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Let <var>evaluatePromise</var> be <var>module</var>.<emu-xref aoid="Evaluate" id="_ref_6438"><a href="ecmascript-language-scripts-and-modules.html#abstract-evaluate">Evaluate</a></emu-xref>().</li><li>Let <var>fulfilledClosure</var> be a new <emu-xref href="#sec-abstract-closure" id="_ref_6439"><a href="ecmascript-data-types-and-values.html#sec-abstract-closure">Abstract Closure</a></emu-xref> with no parameters that captures <var>module</var> and <var>promiseCapability</var> and performs the following steps when called:<ol><li>Let <var>namespace</var> be <emu-xref aoid="GetModuleNamespace" id="_ref_6440"><a href="ecmascript-language-scripts-and-modules.html#sec-getmodulenamespace">GetModuleNamespace</a></emu-xref>(<var>module</var>).</li><li>Perform !&nbsp;<emu-xref aoid="Call" id="_ref_6441"><a href="abstract-operations.html#sec-call" class="e-user-code e-user-code">Call</a></emu-xref>(<var>promiseCapability</var>.<var class="field">[[Resolve]]</var>, <emu-val>undefined</emu-val>, « <var>namespace</var>&nbsp;»).</li><li>Return <emu-xref aoid="NormalCompletion" id="_ref_6442"><a href="ecmascript-data-types-and-values.html#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Let <var>onFulfilled</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_6443"><a href="ordinary-and-exotic-objects-behaviours.html#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>fulfilledClosure</var>, 0, <emu-val>""</emu-val>, «&nbsp;»).</li><li>Perform <emu-xref aoid="PerformPromiseThen" id="_ref_6444"><a href="control-abstraction-objects.html#sec-performpromisethen">PerformPromiseThen</a></emu-xref>(<var>evaluatePromise</var>, <var>onFulfilled</var>, <var>onRejected</var>).</li><li>Return <emu-const>unused</emu-const>.</li></ol></li><li>Let <var>linkAndEvaluate</var> be <emu-xref aoid="CreateBuiltinFunction" id="_ref_6445"><a href="ordinary-and-exotic-objects-behaviours.html#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>linkAndEvaluateClosure</var>, 0, <emu-val>""</emu-val>, «&nbsp;»).</li><li>Perform <emu-xref aoid="PerformPromiseThen" id="_ref_6446"><a href="control-abstraction-objects.html#sec-performpromisethen">PerformPromiseThen</a></emu-xref>(<var>loadPromise</var>, <var>linkAndEvaluate</var>, <var>onRejected</var>).</li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-tagged-templates">
<h1><span class="secnum">13.3.11</span> Tagged Templates</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>A tagged template is a function call where the arguments of the call are derived from a <emu-nt id="_ref_20908"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt> (<emu-xref href="#sec-template-literals" id="_ref_421"><a href="ecmascript-language-expressions.html#sec-template-literals">13.2.8</a></emu-xref>). The actual arguments include a template object (<emu-xref href="#sec-gettemplateobject" id="_ref_422"><a href="ecmascript-language-expressions.html#sec-gettemplateobject">13.2.8.4</a></emu-xref>) and the values produced by evaluating the expressions embedded within the <emu-nt id="_ref_20909"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>.</p>
</div></emu-note>
<emu-clause id="sec-tagged-templates-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.3.11.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="MemberExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="fj52gjle" id="prod-ZiK0MveV">
<emu-nt id="_ref_20910"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>
<emu-nt id="_ref_20911"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>tagRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6447"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20912"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>tagFunc</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6448"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>tagRef</var>).</li><li>Let <var>thisCall</var> be this <emu-nt id="_ref_20913"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_6449"><a href="ecmascript-language-functions-and-classes.html#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisCall</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_6450"><a href="ecmascript-language-expressions.html#sec-evaluatecall" class="e-user-code">EvaluateCall</a></emu-xref>(<var>tagFunc</var>, <var>tagRef</var>, <emu-nt id="_ref_20914"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>, <var>tailCall</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="CallExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="rc744wey" id="prod-N2ZjHnZW">
<emu-nt id="_ref_20915"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>
<emu-nt id="_ref_20916"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>tagRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6451"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20917"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>tagFunc</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6452"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>tagRef</var>).</li><li>Let <var>thisCall</var> be this <emu-nt id="_ref_20918"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>.</li><li>Let <var>tailCall</var> be <emu-xref aoid="IsInTailPosition" id="_ref_6453"><a href="ecmascript-language-functions-and-classes.html#sec-isintailposition">IsInTailPosition</a></emu-xref>(<var>thisCall</var>).</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateCall" id="_ref_6454"><a href="ecmascript-language-expressions.html#sec-evaluatecall" class="e-user-code">EvaluateCall</a></emu-xref>(<var>tagFunc</var>, <var>tagRef</var>, <emu-nt id="_ref_20919"><a href="ecmascript-language-expressions.html#prod-TemplateLiteral">TemplateLiteral</a></emu-nt>, <var>tailCall</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-meta-properties">
<h1><span class="secnum">13.3.12</span> Meta Properties</h1>
<emu-clause id="sec-meta-properties-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.3.12.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="NewTarget" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-NewTarget">NewTarget</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0t4hpsv9" id="prod-OIanAQRE">
<emu-t>new</emu-t>
<emu-t>.</emu-t>
<emu-t>target</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return <emu-xref aoid="GetNewTarget" id="_ref_6455"><a href="executable-code-and-execution-contexts.html#sec-getnewtarget">GetNewTarget</a></emu-xref>().</li></ol></emu-alg>
<emu-grammar><emu-production name="ImportMeta" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ImportMeta">ImportMeta</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="8myn6frq" id="prod-ZjGYptj_">
<emu-t>import</emu-t>
<emu-t>.</emu-t>
<emu-t>meta</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>module</var> be <emu-xref aoid="GetActiveScriptOrModule" id="_ref_6456"><a href="executable-code-and-execution-contexts.html#sec-getactivescriptormodule">GetActiveScriptOrModule</a></emu-xref>().</li><li><emu-xref href="#assert" id="_ref_6457"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>module</var> is a <emu-xref href="#sourctextmodule-record" id="_ref_6458"><a href="ecmascript-language-scripts-and-modules.html#sourctextmodule-record">Source Text Module Record</a></emu-xref>.</li><li>Let <var>importMeta</var> be <var>module</var>.<var class="field">[[ImportMeta]]</var>.</li><li>If <var>importMeta</var> is <emu-const>empty</emu-const>, then<ol><li>Set <var>importMeta</var> to <emu-xref aoid="OrdinaryObjectCreate" id="_ref_6459"><a href="ordinary-and-exotic-objects-behaviours.html#sec-ordinaryobjectcreate">OrdinaryObjectCreate</a></emu-xref>(<emu-val>null</emu-val>).</li><li>Let <var>importMetaValues</var> be <emu-xref aoid="HostGetImportMetaProperties" id="_ref_6460"><a href="ecmascript-language-expressions.html#sec-hostgetimportmetaproperties">HostGetImportMetaProperties</a></emu-xref>(<var>module</var>).</li><li>For each <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6461"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[Key]]</var>, <var class="field">[[Value]]</var>&nbsp;} <var>p</var> of <var>importMetaValues</var>, do<ol><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6462"><a href="abstract-operations.html#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>importMeta</var>, <var>p</var>.<var class="field">[[Key]]</var>, <var>p</var>.<var class="field">[[Value]]</var>).</li></ol></li><li>Perform <emu-xref aoid="HostFinalizeImportMeta" id="_ref_6463"><a href="ecmascript-language-expressions.html#sec-hostfinalizeimportmeta">HostFinalizeImportMeta</a></emu-xref>(<var>importMeta</var>, <var>module</var>).</li><li>Set <var>module</var>.<var class="field">[[ImportMeta]]</var> to <var>importMeta</var>.</li><li>Return <var>importMeta</var>.</li></ol></li><li><emu-xref href="#assert" id="_ref_6464"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>importMeta</var> <emu-xref href="#sec-object-type" id="_ref_6465"><a href="ecmascript-data-types-and-values.html#sec-object-type">is an Object</a></emu-xref>.</li><li>Return <var>importMeta</var>.</li></ol></emu-alg>
<emu-clause id="sec-hostgetimportmetaproperties" type="host-defined abstract operation" aoid="HostGetImportMetaProperties">
<h1><span class="secnum">13.3.12.1.1</span> HostGetImportMetaProperties ( <var>moduleRecord</var> )</h1>
<p>The <emu-xref href="#host-defined" id="_ref_6466"><a href="overview.html#host-defined">host-defined</a></emu-xref> abstract operation HostGetImportMetaProperties takes argument <var>moduleRecord</var> (a <emu-xref href="#sec-abstract-module-records" id="_ref_6467"><a href="ecmascript-language-scripts-and-modules.html#sec-abstract-module-records">Module Record</a></emu-xref>) and returns a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6468"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6469"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">Records</a></emu-xref> with fields <var class="field">[[Key]]</var> (a <emu-xref href="#property-key" id="_ref_6470"><a href="ecmascript-data-types-and-values.html#property-key">property key</a></emu-xref>) and <var class="field">[[Value]]</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6471"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>). It allows <emu-xref href="#host" id="_ref_6472"><a href="overview.html#host">hosts</a></emu-xref> to provide <emu-xref href="#property-key" id="_ref_6473"><a href="ecmascript-data-types-and-values.html#property-key">property keys</a></emu-xref> and values for the object returned from <code>import.meta</code>.</p>
<p>The default implementation of HostGetImportMetaProperties is to return a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6474"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</p>
</emu-clause>
<emu-clause id="sec-hostfinalizeimportmeta" type="host-defined abstract operation" aoid="HostFinalizeImportMeta">
<h1><span class="secnum">13.3.12.1.2</span> HostFinalizeImportMeta ( <var>importMeta</var>, <var>moduleRecord</var> )</h1>
<p>The <emu-xref href="#host-defined" id="_ref_6475"><a href="overview.html#host-defined">host-defined</a></emu-xref> abstract operation HostFinalizeImportMeta takes arguments <var>importMeta</var> (an Object) and <var>moduleRecord</var> (a <emu-xref href="#sec-abstract-module-records" id="_ref_6476"><a href="ecmascript-language-scripts-and-modules.html#sec-abstract-module-records">Module Record</a></emu-xref>) and returns <emu-const>unused</emu-const>. It allows <emu-xref href="#host" id="_ref_6477"><a href="overview.html#host">hosts</a></emu-xref> to perform any extraordinary operations to prepare the object returned from <code>import.meta</code>.</p>
<p>Most <emu-xref href="#host" id="_ref_6478"><a href="overview.html#host">hosts</a></emu-xref> will be able to simply define <emu-xref aoid="HostGetImportMetaProperties" id="_ref_6479"><a href="ecmascript-language-expressions.html#sec-hostgetimportmetaproperties">HostGetImportMetaProperties</a></emu-xref>, and leave HostFinalizeImportMeta with its default behaviour. However, HostFinalizeImportMeta provides an "escape hatch" for <emu-xref href="#host" id="_ref_6480"><a href="overview.html#host">hosts</a></emu-xref> which need to directly manipulate the object before it is exposed to ECMAScript code.</p>
<p>The default implementation of HostFinalizeImportMeta is to return <emu-const>unused</emu-const>.</p>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-update-expressions">
<h1><span class="secnum">13.4</span> Update Expressions</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="UpdateExpression" params="Yield, Await" id="prod-UpdateExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="t7cmhicy">
<emu-nt params="?Yield, ?Await" id="_ref_20920"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="egpm8pw8" id="prod-w05b3u14">
<emu-nt params="?Yield, ?Await" id="_ref_20921"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-gann>[no <emu-nt id="_ref_20922"><a href="ecmascript-language-lexical-grammar.html#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann>
<emu-t>++</emu-t>
</emu-rhs>
<emu-rhs a="xaomniuu" id="prod-ij__hpSO">
<emu-nt params="?Yield, ?Await" id="_ref_20923"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-gann>[no <emu-nt id="_ref_20924"><a href="ecmascript-language-lexical-grammar.html#prod-LineTerminator">LineTerminator</a></emu-nt> here]</emu-gann>
<emu-t>--</emu-t>
</emu-rhs>
<emu-rhs a="4u-mahoy" id="prod-qnUAnDpi">
<emu-t>++</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20925"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="mutg-4fe" id="prod-an6Vm9J4">
<emu-t>--</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20926"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-update-expressions-static-semantics-early-errors">
<h1><span class="secnum">13.4.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="UpdateExpression">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="i_jjg0ex">
<emu-nt id="_ref_20927"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>++</emu-t>
</emu-rhs>
<emu-rhs a="jr0tcoqg">
<emu-nt id="_ref_20928"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>--</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is an early Syntax Error if the <emu-xref aoid="AssignmentTargetType" id="_ref_6481"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_20929"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>invalid</emu-const>.
</li>
</ul>
<emu-grammar><emu-production name="UpdateExpression">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vwgxygda">
<emu-t>++</emu-t>
<emu-nt id="_ref_20930"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
<emu-rhs a="onrvwudi">
<emu-t>--</emu-t>
<emu-nt id="_ref_20931"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is an early Syntax Error if the <emu-xref aoid="AssignmentTargetType" id="_ref_6482"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_20932"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> is <emu-const>invalid</emu-const>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-postfix-increment-operator">
<h1><span class="secnum">13.4.2</span> Postfix Increment Operator</h1>
<emu-clause id="sec-postfix-increment-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.4.2.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UpdateExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="i_jjg0ex" id="prod-rHS1jNn2">
<emu-nt id="_ref_20933"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>++</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lhs</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6483"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20934"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>If the <emu-xref aoid="AssignmentTargetType" id="_ref_6484"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_20935"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>web-compat</emu-const>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumeric" id="_ref_6485"><a href="abstract-operations.html#sec-tonumeric" class="e-user-code">ToNumeric</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6486"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lhs</var>)).</li><li>If <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_6487"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-number-type">is a Number</a></emu-xref>, then<ol><li>Let <var>newValue</var> be <emu-xref aoid="Number::add" id="_ref_6488"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-add">Number::add</a></emu-xref>(<var>oldValue</var>, <emu-val>1</emu-val><sub>𝔽</sub>).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6489"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-bigint-type" id="_ref_6490"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-bigint-type">is a BigInt</a></emu-xref>.</li><li>Let <var>newValue</var> be <emu-xref aoid="BigInt::add" id="_ref_6491"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-add">BigInt::add</a></emu-xref>(<var>oldValue</var>, <emu-val>1</emu-val><sub></sub>).</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6492"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lhs</var>, <var>newValue</var>).</li><li>Return <var>oldValue</var>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-postfix-decrement-operator">
<h1><span class="secnum">13.4.3</span> Postfix Decrement Operator</h1>
<emu-clause id="sec-postfix-decrement-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.4.3.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UpdateExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="jr0tcoqg" id="prod-wioTQf27">
<emu-nt id="_ref_20936"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>--</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lhs</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6493"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20937"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>If the <emu-xref aoid="AssignmentTargetType" id="_ref_6494"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_20938"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>web-compat</emu-const>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumeric" id="_ref_6495"><a href="abstract-operations.html#sec-tonumeric" class="e-user-code">ToNumeric</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6496"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lhs</var>)).</li><li>If <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_6497"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-number-type">is a Number</a></emu-xref>, then<ol><li>Let <var>newValue</var> be <emu-xref aoid="Number::subtract" id="_ref_6498"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-subtract">Number::subtract</a></emu-xref>(<var>oldValue</var>, <emu-val>1</emu-val><sub>𝔽</sub>).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6499"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-bigint-type" id="_ref_6500"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-bigint-type">is a BigInt</a></emu-xref>.</li><li>Let <var>newValue</var> be <emu-xref aoid="BigInt::subtract" id="_ref_6501"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-subtract">BigInt::subtract</a></emu-xref>(<var>oldValue</var>, <emu-val>1</emu-val><sub></sub>).</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6502"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lhs</var>, <var>newValue</var>).</li><li>Return <var>oldValue</var>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-prefix-increment-operator">
<h1><span class="secnum">13.4.4</span> Prefix Increment Operator</h1>
<emu-clause id="sec-prefix-increment-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.4.4.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UpdateExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vwgxygda" id="prod-10GLxGSJ">
<emu-t>++</emu-t>
<emu-nt id="_ref_20939"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6503"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20940"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>If the <emu-xref aoid="AssignmentTargetType" id="_ref_6504"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_20941"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> is <emu-const>web-compat</emu-const>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumeric" id="_ref_6505"><a href="abstract-operations.html#sec-tonumeric" class="e-user-code">ToNumeric</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6506"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>expr</var>)).</li><li>If <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_6507"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-number-type">is a Number</a></emu-xref>, then<ol><li>Let <var>newValue</var> be <emu-xref aoid="Number::add" id="_ref_6508"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-add">Number::add</a></emu-xref>(<var>oldValue</var>, <emu-val>1</emu-val><sub>𝔽</sub>).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6509"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-bigint-type" id="_ref_6510"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-bigint-type">is a BigInt</a></emu-xref>.</li><li>Let <var>newValue</var> be <emu-xref aoid="BigInt::add" id="_ref_6511"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-add">BigInt::add</a></emu-xref>(<var>oldValue</var>, <emu-val>1</emu-val><sub></sub>).</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6512"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>expr</var>, <var>newValue</var>).</li><li>Return <var>newValue</var>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-prefix-decrement-operator">
<h1><span class="secnum">13.4.5</span> Prefix Decrement Operator</h1>
<emu-clause id="sec-prefix-decrement-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.4.5.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UpdateExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="onrvwudi" id="prod-DhW7Culr">
<emu-t>--</emu-t>
<emu-nt id="_ref_20942"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6513"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20943"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>If the <emu-xref aoid="AssignmentTargetType" id="_ref_6514"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_20944"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> is <emu-const>web-compat</emu-const>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumeric" id="_ref_6515"><a href="abstract-operations.html#sec-tonumeric" class="e-user-code">ToNumeric</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6516"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>expr</var>)).</li><li>If <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_6517"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-number-type">is a Number</a></emu-xref>, then<ol><li>Let <var>newValue</var> be <emu-xref aoid="Number::subtract" id="_ref_6518"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-subtract">Number::subtract</a></emu-xref>(<var>oldValue</var>, <emu-val>1</emu-val><sub>𝔽</sub>).</li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6519"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-bigint-type" id="_ref_6520"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-bigint-type">is a BigInt</a></emu-xref>.</li><li>Let <var>newValue</var> be <emu-xref aoid="BigInt::subtract" id="_ref_6521"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-subtract">BigInt::subtract</a></emu-xref>(<var>oldValue</var>, <emu-val>1</emu-val><sub></sub>).</li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6522"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>expr</var>, <var>newValue</var>).</li><li>Return <var>newValue</var>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-unary-operators">
<h1><span class="secnum">13.5</span> Unary Operators</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="UnaryExpression" params="Yield, Await" id="prod-UnaryExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="lrh_izya">
<emu-nt params="?Yield, ?Await" id="_ref_20945"><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="qh6tas2i" id="prod-n3f1x4OA">
<emu-t>delete</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20946"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="d3t3dyzd" id="prod-bEnaiUfM">
<emu-t>void</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20947"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="atfv1ezt" id="prod-oOmRMvU8">
<emu-t>typeof</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20948"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="1zx-fkm3" id="prod-55Xz_E0Z">
<emu-t>+</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20949"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="lehvx30i" id="prod-yxAmCDj1">
<emu-t>-</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20950"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="mvwftuyy" id="prod-nw8eIftf">
<emu-t>~</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20951"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="cm7fnuig" id="prod-4lEraLTO">
<emu-t>!</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20952"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="dfqdbsrx" constraints="+Await" id="prod-zVi0tVGF"><emu-constraints>[+Await]</emu-constraints>
<emu-nt params="?Yield" id="_ref_20953"><a href="ecmascript-language-functions-and-classes.html#prod-AwaitExpression">AwaitExpression</a><emu-mods><emu-params>[?Yield]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-delete-operator">
<h1><span class="secnum">13.5.1</span> The <code>delete</code> Operator</h1>
<emu-clause id="sec-delete-operator-static-semantics-early-errors">
<h1><span class="secnum">13.5.1.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v9wiw5nl">
<emu-t>delete</emu-t>
<emu-nt id="_ref_20954"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-xref aoid="IsStrict" id="_ref_6523"><a href="ecmascript-language-source-code.html#sec-isstrict">IsStrict</a></emu-xref>(the <emu-nt id="_ref_20955"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>) is <emu-val>true</emu-val> and the derived <emu-nt id="_ref_20956"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> is <emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="i2hxnrih"><emu-nt id="_ref_20957"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>, <emu-grammar><emu-production name="MemberExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0uk9afbi">
<emu-nt id="_ref_20958"><a href="ecmascript-language-expressions.html#prod-MemberExpression">MemberExpression</a></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20959"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>, <emu-grammar><emu-production name="CallExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="cysjk9wh">
<emu-nt id="_ref_20960"><a href="ecmascript-language-expressions.html#prod-CallExpression">CallExpression</a></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20961"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>, <emu-grammar><emu-production name="OptionalChain" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0xlnjlpz">
<emu-t>?.</emu-t>
<emu-nt id="_ref_20962"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>, or <emu-grammar><emu-production name="OptionalChain" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="dnp-fbqk">
<emu-nt id="_ref_20963"><a href="ecmascript-language-expressions.html#prod-OptionalChain">OptionalChain</a></emu-nt>
<emu-t>.</emu-t>
<emu-nt id="_ref_20964"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>.
</li>
<li>
<p>
It is a Syntax Error if the derived <emu-nt id="_ref_20965"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> is<br>
<emu-grammar><emu-production name="PrimaryExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-PrimaryExpression">PrimaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="yrb110hm"><emu-nt id="_ref_20966"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar><br>
and <emu-nt id="_ref_20967"><a href="ecmascript-language-expressions.html#prod-CoverParenthesizedExpressionAndArrowParameterList">CoverParenthesizedExpressionAndArrowParameterList</a></emu-nt> ultimately derives a phrase that, if used in place of <emu-nt id="_ref_20968"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>, would produce a Syntax Error according to these rules. This rule is recursively applied.
</p>
</li>
</ul>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The last rule means that expressions such as <code>delete (((foo)))</code> produce <emu-xref href="#early-error" id="_ref_6524"><a href="error-handling-and-language-extensions.html#early-error">early errors</a></emu-xref> because of recursive application of the first rule.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-delete-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.5.1.2</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="v9wiw5nl" id="prod-1QeAbR0Z">
<emu-t>delete</emu-t>
<emu-nt id="_ref_20969"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>ref</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6525"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20970"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>If <var>ref</var> is not a <emu-xref href="#sec-reference-record-specification-type" id="_ref_6526"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref>, return <emu-val>true</emu-val>.</li><li>If <emu-xref aoid="IsUnresolvableReference" id="_ref_6527"><a href="ecmascript-data-types-and-values.html#sec-isunresolvablereference">IsUnresolvableReference</a></emu-xref>(<var>ref</var>) is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_6528"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>ref</var>.<var class="field">[[Strict]]</var> is <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></li><li>If <emu-xref aoid="IsPropertyReference" id="_ref_6529"><a href="ecmascript-data-types-and-values.html#sec-ispropertyreference">IsPropertyReference</a></emu-xref>(<var>ref</var>) is <emu-val>true</emu-val>, then<ol><li><emu-xref href="#assert" id="_ref_6530"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <emu-xref aoid="IsPrivateReference" id="_ref_6531"><a href="ecmascript-data-types-and-values.html#sec-isprivatereference">IsPrivateReference</a></emu-xref>(<var>ref</var>) is <emu-val>false</emu-val>.</li><li>If <emu-xref aoid="IsSuperReference" id="_ref_6532"><a href="ecmascript-data-types-and-values.html#sec-issuperreference">IsSuperReference</a></emu-xref>(<var>ref</var>) is <emu-val>true</emu-val>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li id="step-delete-operator-toobject">Let <var>baseObj</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_6533"><a href="abstract-operations.html#sec-toobject">ToObject</a></emu-xref>(<var>ref</var>.<var class="field">[[Base]]</var>).</li><li>If <var>ref</var>.<var class="field">[[ReferencedName]]</var> is not a <emu-xref href="#property-key" id="_ref_6534"><a href="ecmascript-data-types-and-values.html#property-key">property key</a></emu-xref>, then<ol><li>Set <var>ref</var>.<var class="field">[[ReferencedName]]</var> to ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_6535"><a href="abstract-operations.html#sec-topropertykey" class="e-user-code">ToPropertyKey</a></emu-xref>(<var>ref</var>.<var class="field">[[ReferencedName]]</var>).</li></ol></li><li>Let <var>deleteStatus</var> be ?&nbsp;<span class="e-user-code"><var>baseObj</var>.<var class="field">[[Delete]]</var>(<var>ref</var>.<var class="field">[[ReferencedName]]</var>)</span>.</li><li>If <var>deleteStatus</var> is <emu-val>false</emu-val> and <var>ref</var>.<var class="field">[[Strict]]</var> is <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>deleteStatus</var>.</li></ol></li><li>Let <var>base</var> be <var>ref</var>.<var class="field">[[Base]]</var>.</li><li><emu-xref href="#assert" id="_ref_6536"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>base</var> is an <emu-xref href="#sec-environment-records" id="_ref_6537"><a href="executable-code-and-execution-contexts.html#sec-environment-records">Environment Record</a></emu-xref>.</li><li>Return ?&nbsp;<span class="e-user-code"><var>base</var>.<emu-xref aoid="DeleteBinding" id="_ref_6538"><a href="executable-code-and-execution-contexts.html#abstract-deletebinding">DeleteBinding</a></emu-xref>(<var>ref</var>.<var class="field">[[ReferencedName]]</var>)</span>.</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>When a <code>delete</code> operator occurs within <emu-xref href="#sec-strict-mode-code" id="_ref_6539"><a href="ecmascript-language-source-code.html#sec-strict-mode-code">strict mode code</a></emu-xref>, a <emu-val>SyntaxError</emu-val> exception is thrown if its <emu-nt id="_ref_20971"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> is a direct reference to a variable, function argument, or function name. In addition, if a <code>delete</code> operator occurs within <emu-xref href="#sec-strict-mode-code" id="_ref_6540"><a href="ecmascript-language-source-code.html#sec-strict-mode-code">strict mode code</a></emu-xref> and the property to be deleted has the attribute { <var class="field">[[Configurable]]</var>: <emu-val>false</emu-val> } (or otherwise cannot be deleted), a <emu-val>TypeError</emu-val> exception is thrown.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The object that may be created in step <emu-xref href="#step-delete-operator-toobject" id="_ref_423"><a href="ecmascript-language-expressions.html#step-delete-operator-toobject">4.c</a></emu-xref> is not accessible outside of the above abstract operation and the <emu-xref href="#ordinary-object" id="_ref_6541"><a href="ecmascript-data-types-and-values.html#ordinary-object">ordinary object</a></emu-xref> <var class="field">[[Delete]]</var> internal method. An implementation might choose to avoid the actual creation of that object.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-void-operator">
<h1><span class="secnum">13.5.2</span> The <code>void</code> Operator</h1>
<emu-clause id="sec-void-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.5.2.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="5dgdjy7z" id="prod-aU1kwA1W">
<emu-t>void</emu-t>
<emu-nt id="_ref_20972"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6542"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20973"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Perform ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6543"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>expr</var>).</li><li>Return <emu-val>undefined</emu-val>.</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-xref aoid="GetValue" id="_ref_6544"><a href="ecmascript-data-types-and-values.html#sec-getvalue">GetValue</a></emu-xref> must be called even though its value is not used because it may have observable side-effects.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-typeof-operator">
<h1><span class="secnum">13.5.3</span> The <code>typeof</code> Operator</h1>
<emu-clause id="sec-typeof-operator-runtime-semantics-evaluation" oldids="table-typeof-operator-results,sec-IsHTMLDDA-internal-slot-typeof" type="sdo"><span id="sec-IsHTMLDDA-internal-slot-typeof"></span><span id="table-typeof-operator-results"></span>
<h1><span class="secnum">13.5.3.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="qxosuesc" id="prod-1gTisO9f">
<emu-t>typeof</emu-t>
<emu-nt id="_ref_20974"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>val</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6546"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20975"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>If <var>val</var> is a <emu-xref href="#sec-reference-record-specification-type" id="_ref_6547"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref>, then<ol><li>If <emu-xref aoid="IsUnresolvableReference" id="_ref_6548"><a href="ecmascript-data-types-and-values.html#sec-isunresolvablereference">IsUnresolvableReference</a></emu-xref>(<var>val</var>) is <emu-val>true</emu-val>, return <emu-val>"undefined"</emu-val>.</li></ol></li><li>Set <var>val</var> to ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6549"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>val</var>).</li><li>If <var>val</var> is <emu-val>undefined</emu-val>, return <emu-val>"undefined"</emu-val>.</li><li>If <var>val</var> is <emu-val>null</emu-val>, return <emu-val>"object"</emu-val>.</li><li>If <var>val</var> <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6550"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-string-type">is a String</a></emu-xref>, return <emu-val>"string"</emu-val>.</li><li>If <var>val</var> <emu-xref href="#sec-ecmascript-language-types-symbol-type" id="_ref_6551"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-symbol-type">is a Symbol</a></emu-xref>, return <emu-val>"symbol"</emu-val>.</li><li>If <var>val</var> <emu-xref href="#sec-ecmascript-language-types-boolean-type" id="_ref_6552"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-boolean-type">is a Boolean</a></emu-xref>, return <emu-val>"boolean"</emu-val>.</li><li>If <var>val</var> <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_6553"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-number-type">is a Number</a></emu-xref>, return <emu-val>"number"</emu-val>.</li><li>If <var>val</var> <emu-xref href="#sec-ecmascript-language-types-bigint-type" id="_ref_6554"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-bigint-type">is a BigInt</a></emu-xref>, return <emu-val>"bigint"</emu-val>.</li><li><emu-xref href="#assert" id="_ref_6555"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>val</var> <emu-xref href="#sec-object-type" id="_ref_6556"><a href="ecmascript-data-types-and-values.html#sec-object-type">is an Object</a></emu-xref>.</li><li id="step-typeof-web-compat-insertion-point" normative-optional=""><div class="attributes-tag"><emu-xref href="#sec-conformance" id="_ref_6545"><a href="conformance.html#sec-conformance">Normative Optional</a></emu-xref></div>If the <emu-xref href="#host" id="_ref_6557"><a href="overview.html#host">host</a></emu-xref> is a web browser or otherwise supports <emu-xref href="#sec-IsHTMLDDA-internal-slot" title="" id="_ref_424"><a href="additional-ecmascript-features-for-web-browsers.html#sec-IsHTMLDDA-internal-slot">The <var class="field">[[IsHTMLDDA]]</var> Internal Slot</a></emu-xref>, then<ol><li>If <var>val</var> has an <var class="field">[[IsHTMLDDA]]</var> internal slot, return <emu-val>"undefined"</emu-val>.</li></ol></li><li>If <var>val</var> has a <var class="field">[[Call]]</var> internal method, return <emu-val>"function"</emu-val>.</li><li>Return <emu-val>"object"</emu-val>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-unary-plus-operator">
<h1><span class="secnum">13.5.4</span> Unary <code>+</code> Operator</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The unary + operator converts its operand to <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_6558"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-number-type">Number type</a></emu-xref>.</p>
</div></emu-note>
<emu-clause id="sec-unary-plus-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.5.4.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="o0kdmush" id="prod-2HNipbZz">
<emu-t>+</emu-t>
<emu-nt id="_ref_20976"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6559"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20977"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="ToNumber" id="_ref_6560"><a href="abstract-operations.html#sec-tonumber" class="e-user-code">ToNumber</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6561"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>expr</var>)).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-unary-minus-operator">
<h1><span class="secnum">13.5.5</span> Unary <code>-</code> Operator</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The unary <code>-</code> operator converts its operand to a numeric value and then negates it. Negating <emu-val>+0</emu-val><sub>𝔽</sub> produces <emu-val>-0</emu-val><sub>𝔽</sub>, and negating <emu-val>-0</emu-val><sub>𝔽</sub> produces <emu-val>+0</emu-val><sub>𝔽</sub>.</p>
</div></emu-note>
<emu-clause id="sec-unary-minus-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.5.5.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="odzkxnu5" id="prod-pAGhFy1g">
<emu-t>-</emu-t>
<emu-nt id="_ref_20978"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6562"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20979"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumeric" id="_ref_6563"><a href="abstract-operations.html#sec-tonumeric" class="e-user-code">ToNumeric</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6564"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>expr</var>)).</li><li>If <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_6565"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-number-type">is a Number</a></emu-xref>, return <emu-xref aoid="Number::unaryMinus" id="_ref_6566"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-unaryMinus">Number::unaryMinus</a></emu-xref>(<var>oldValue</var>).</li><li><emu-xref href="#assert" id="_ref_6567"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-bigint-type" id="_ref_6568"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-bigint-type">is a BigInt</a></emu-xref>.</li><li>Return <emu-xref aoid="BigInt::unaryMinus" id="_ref_6569"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-unaryMinus">BigInt::unaryMinus</a></emu-xref>(<var>oldValue</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-bitwise-not-operator">
<h1><span class="secnum">13.5.6</span> Bitwise NOT Operator ( <code>~</code> )</h1>
<emu-clause id="sec-bitwise-not-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.5.6.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="b9nqec7b" id="prod-JRszWout">
<emu-t>~</emu-t>
<emu-nt id="_ref_20980"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6570"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20981"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be ?&nbsp;<emu-xref aoid="ToNumeric" id="_ref_6571"><a href="abstract-operations.html#sec-tonumeric" class="e-user-code">ToNumeric</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6572"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>expr</var>)).</li><li>If <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_6573"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-number-type">is a Number</a></emu-xref>, return <emu-xref aoid="Number::bitwiseNOT" id="_ref_6574"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-bitwiseNOT">Number::bitwiseNOT</a></emu-xref>(<var>oldValue</var>).</li><li><emu-xref href="#assert" id="_ref_6575"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>oldValue</var> <emu-xref href="#sec-ecmascript-language-types-bigint-type" id="_ref_6576"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-bigint-type">is a BigInt</a></emu-xref>.</li><li>Return <emu-xref aoid="BigInt::bitwiseNOT" id="_ref_6577"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-bitwiseNOT">BigInt::bitwiseNOT</a></emu-xref>(<var>oldValue</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-logical-not-operator">
<h1><span class="secnum">13.5.7</span> Logical NOT Operator ( <code>!</code> )</h1>
<emu-clause id="sec-logical-not-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.5.7.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="UnaryExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ulcvcjyx" id="prod-bMAu-F7p">
<emu-t>!</emu-t>
<emu-nt id="_ref_20982"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6578"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_20983"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a></emu-nt>.</li><li>Let <var>oldValue</var> be <emu-xref aoid="ToBoolean" id="_ref_6579"><a href="abstract-operations.html#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6580"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>expr</var>)).</li><li>If <var>oldValue</var> is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-exp-operator">
<h1><span class="secnum">13.6</span> Exponentiation Operator</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ExponentiationExpression" params="Yield, Await" id="prod-ExponentiationExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ExponentiationExpression">ExponentiationExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="8ws4fpw1">
<emu-nt params="?Yield, ?Await" id="_ref_20984"><a href="ecmascript-language-expressions.html#prod-UnaryExpression">UnaryExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="sofstrau" id="prod-EEr7dA-y">
<emu-nt params="?Yield, ?Await" id="_ref_20985"><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>**</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_20986"><a href="ecmascript-language-expressions.html#prod-ExponentiationExpression">ExponentiationExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-exp-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.6.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ExponentiationExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0zbfzgb0" id="prod-Ig4oSMA1">
<emu-nt id="_ref_20987"><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a></emu-nt>
<emu-t>**</emu-t>
<emu-nt id="_ref_20988"><a href="ecmascript-language-expressions.html#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6581"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_20989"><a href="ecmascript-language-expressions.html#prod-UpdateExpression">UpdateExpression</a></emu-nt>, <code>**</code>, <emu-nt id="_ref_20990"><a href="ecmascript-language-expressions.html#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-multiplicative-operators">
<h1><span class="secnum">13.7</span> Multiplicative Operators</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="MultiplicativeExpression" params="Yield, Await" id="prod-MultiplicativeExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="z3kjsjvx">
<emu-nt params="?Yield, ?Await" id="_ref_20991"><a href="ecmascript-language-expressions.html#prod-ExponentiationExpression">ExponentiationExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="wkojp9vf" id="prod-D9vYTSYe">
<emu-nt params="?Yield, ?Await" id="_ref_20992"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt id="_ref_20993"><a href="ecmascript-language-expressions.html#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_20994"><a href="ecmascript-language-expressions.html#prod-ExponentiationExpression">ExponentiationExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="MultiplicativeOperator" oneof="" id="prod-MultiplicativeOperator">
<emu-nt><a href="ecmascript-language-expressions.html#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt> <emu-geq>:</emu-geq> <emu-oneof>one of</emu-oneof> <emu-rhs><emu-t>*</emu-t> <emu-t>/</emu-t> <emu-t>%</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<ul>
<li>The <code>*</code> operator performs multiplication, producing the product of its operands.</li>
<li>The <code>/</code> operator performs division, producing the quotient of its operands.</li>
<li>The <code>%</code> operator yields the remainder of its operands from an implied division.</li>
</ul>
</div></emu-note>
<emu-clause id="sec-multiplicative-operators-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.7.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="MultiplicativeExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="-5_iophl" id="prod-k6IpXNbV">
<emu-nt id="_ref_20995"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt>
<emu-nt id="_ref_20996"><a href="ecmascript-language-expressions.html#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt>
<emu-nt id="_ref_20997"><a href="ecmascript-language-expressions.html#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>opText</var> be the <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6582"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">source text matched by</a></emu-xref> <emu-nt id="_ref_20998"><a href="ecmascript-language-expressions.html#prod-MultiplicativeOperator">MultiplicativeOperator</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6583"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_20999"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt>, <var>opText</var>, <emu-nt id="_ref_21000"><a href="ecmascript-language-expressions.html#prod-ExponentiationExpression">ExponentiationExpression</a></emu-nt>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-additive-operators">
<h1><span class="secnum">13.8</span> Additive Operators</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="AdditiveExpression" params="Yield, Await" id="prod-AdditiveExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="9q89e3qa">
<emu-nt params="?Yield, ?Await" id="_ref_21001"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="efn1nbbh" id="prod--RZPkEex">
<emu-nt params="?Yield, ?Await" id="_ref_21002"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>+</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21003"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="4wmnuxdc" id="prod-XorHFOnH">
<emu-nt params="?Yield, ?Await" id="_ref_21004"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>-</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21005"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-addition-operator-plus">
<h1><span class="secnum">13.8.1</span> The Addition Operator ( <code>+</code> )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The addition operator either performs string concatenation or numeric addition.</p>
</div></emu-note>
<emu-clause id="sec-addition-operator-plus-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.8.1.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="AdditiveExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="dkl7f70y" id="prod-QDoARwWX">
<emu-nt id="_ref_21006"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>
<emu-t>+</emu-t>
<emu-nt id="_ref_21007"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6584"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_21008"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>, <code>+</code>, <emu-nt id="_ref_21009"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-subtraction-operator-minus">
<h1><span class="secnum">13.8.2</span> The Subtraction Operator ( <code>-</code> )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The <code>-</code> operator performs subtraction, producing the difference of its operands.</p>
</div></emu-note>
<emu-clause id="sec-subtraction-operator-minus-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.8.2.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="AdditiveExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="7gvefllu" id="prod-YHTEjt6S">
<emu-nt id="_ref_21010"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>
<emu-t>-</emu-t>
<emu-nt id="_ref_21011"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6585"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_21012"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>, <code>-</code>, <emu-nt id="_ref_21013"><a href="ecmascript-language-expressions.html#prod-MultiplicativeExpression">MultiplicativeExpression</a></emu-nt>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-bitwise-shift-operators">
<h1><span class="secnum">13.9</span> Bitwise Shift Operators</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ShiftExpression" params="Yield, Await" id="prod-ShiftExpression">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="5myeagmz">
<emu-nt params="?Yield, ?Await" id="_ref_21014"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="ir3jyndh" id="prod-fBlf7SId">
<emu-nt params="?Yield, ?Await" id="_ref_21015"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&lt;&lt;</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21016"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="dbgq-61d" id="prod--QVo0NY2">
<emu-nt params="?Yield, ?Await" id="_ref_21017"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&gt;&gt;</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21018"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="yxrnku6r" id="prod-VbX7s-GB">
<emu-nt params="?Yield, ?Await" id="_ref_21019"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&gt;&gt;&gt;</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21020"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-left-shift-operator">
<h1><span class="secnum">13.9.1</span> The Left Shift Operator ( <code>&lt;&lt;</code> )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Performs a bitwise left shift operation on the left operand by the amount specified by the right operand.</p>
</div></emu-note>
<emu-clause id="sec-left-shift-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.9.1.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ShiftExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="tg9tkm4d" id="prod-17NrpRTI">
<emu-nt id="_ref_21021"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
<emu-t>&lt;&lt;</emu-t>
<emu-nt id="_ref_21022"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6586"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_21023"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>, <code>&lt;&lt;</code>, <emu-nt id="_ref_21024"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-signed-right-shift-operator">
<h1><span class="secnum">13.9.2</span> The Signed Right Shift Operator ( <code>&gt;&gt;</code> )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Performs a sign-filling bitwise right shift operation on the left operand by the amount specified by the right operand.</p>
</div></emu-note>
<emu-clause id="sec-signed-right-shift-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.9.2.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ShiftExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vimn88nj" id="prod-wu5oH3lt">
<emu-nt id="_ref_21025"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
<emu-t>&gt;&gt;</emu-t>
<emu-nt id="_ref_21026"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6587"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_21027"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>, <code>&gt;&gt;</code>, <emu-nt id="_ref_21028"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-unsigned-right-shift-operator">
<h1><span class="secnum">13.9.3</span> The Unsigned Right Shift Operator ( <code>&gt;&gt;&gt;</code> )</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Performs a zero-filling bitwise right shift operation on the left operand by the amount specified by the right operand.</p>
</div></emu-note>
<emu-clause id="sec-unsigned-right-shift-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.9.3.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ShiftExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="n_furjdr" id="prod-erFDFU2C">
<emu-nt id="_ref_21029"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
<emu-t>&gt;&gt;&gt;</emu-t>
<emu-nt id="_ref_21030"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6588"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_21031"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>, <code>&gt;&gt;&gt;</code>, <emu-nt id="_ref_21032"><a href="ecmascript-language-expressions.html#prod-AdditiveExpression">AdditiveExpression</a></emu-nt>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-relational-operators">
<h1><span class="secnum">13.10</span> Relational Operators</h1>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>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.</p>
</div></emu-note>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="RelationalExpression" params="In, Yield, Await" id="prod-RelationalExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="evzvmihy">
<emu-nt params="?Yield, ?Await" id="_ref_21033"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="rpncjsrj" id="prod-KibMHocH">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21034"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&lt;</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21035"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="4ijt0lxw" id="prod-W1sKvRa9">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21036"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&gt;</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21037"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="raidxcln" id="prod-H5jP53q2">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21038"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&lt;=</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21039"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="unuuwbsz" id="prod-g28T6iwt">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21040"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&gt;=</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21041"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="imdygppt" id="prod-abEstsgg">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21042"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>instanceof</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21043"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="tinqflo_" constraints="+In" id="prod-8_yvvfCY"><emu-constraints>[+In]</emu-constraints>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_21044"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>in</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21045"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="pkiqafbw" constraints="+In" id="prod-3D8w-akN"><emu-constraints>[+In]</emu-constraints>
<emu-nt id="_ref_21046"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
<emu-t>in</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21047"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>The <sub>[In]</sub> grammar parameter is needed to avoid confusing the <code>in</code> operator in a relational expression with the <code>in</code> operator in a <code>for</code> statement.</p>
</div></emu-note>
<emu-clause id="sec-relational-operators-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.10.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0hbjkrqw" id="prod-3gCYoRfU">
<emu-nt id="_ref_21048"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
<emu-t>&lt;</emu-t>
<emu-nt id="_ref_21049"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6589"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21050"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6590"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6591"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21051"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6592"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Let <var>r</var> be ?&nbsp;<emu-xref aoid="IsLessThan" id="_ref_6593"><a href="abstract-operations.html#sec-islessthan" class="e-user-code">IsLessThan</a></emu-xref>(<var>lVal</var>, <var>rVal</var>, <emu-val>true</emu-val>).</li><li>If <var>r</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <var>r</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gziyg7ut" id="prod-4iUOHdEx">
<emu-nt id="_ref_21052"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
<emu-t>&gt;</emu-t>
<emu-nt id="_ref_21053"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6594"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21054"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6595"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6596"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21055"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6597"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Let <var>r</var> be ?&nbsp;<emu-xref aoid="IsLessThan" id="_ref_6598"><a href="abstract-operations.html#sec-islessthan" class="e-user-code">IsLessThan</a></emu-xref>(<var>rVal</var>, <var>lVal</var>, <emu-val>false</emu-val>).</li><li>If <var>r</var> is <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <var>r</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="kcktdtrm" id="prod-jZs1rFWK">
<emu-nt id="_ref_21056"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
<emu-t>&lt;=</emu-t>
<emu-nt id="_ref_21057"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6599"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21058"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6600"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6601"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21059"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6602"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Let <var>r</var> be ?&nbsp;<emu-xref aoid="IsLessThan" id="_ref_6603"><a href="abstract-operations.html#sec-islessthan" class="e-user-code">IsLessThan</a></emu-xref>(<var>rVal</var>, <var>lVal</var>, <emu-val>false</emu-val>).</li><li>If <var>r</var> is either <emu-val>true</emu-val> or <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="3cupp_tq" id="prod-ZF2k2rEh">
<emu-nt id="_ref_21060"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
<emu-t>&gt;=</emu-t>
<emu-nt id="_ref_21061"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6604"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21062"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6605"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6606"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21063"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6607"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Let <var>r</var> be ?&nbsp;<emu-xref aoid="IsLessThan" id="_ref_6608"><a href="abstract-operations.html#sec-islessthan" class="e-user-code">IsLessThan</a></emu-xref>(<var>lVal</var>, <var>rVal</var>, <emu-val>true</emu-val>).</li><li>If <var>r</var> is either <emu-val>true</emu-val> or <emu-val>undefined</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="1ec9rmdp" id="prod-X4T8u1As">
<emu-nt id="_ref_21064"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
<emu-t>instanceof</emu-t>
<emu-nt id="_ref_21065"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6609"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21066"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6610"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6611"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21067"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6612"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Return ?&nbsp;<emu-xref aoid="InstanceofOperator" id="_ref_6613"><a href="ecmascript-language-expressions.html#sec-instanceofoperator" class="e-user-code">InstanceofOperator</a></emu-xref>(<var>lVal</var>, <var>rVal</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="9mtjpkmx" id="prod-Xv5acyHs">
<emu-nt id="_ref_21068"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
<emu-t>in</emu-t>
<emu-nt id="_ref_21069"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6614"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21070"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6615"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6616"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21071"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6617"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>If <var>rVal</var> <emu-xref href="#sec-object-type" id="_ref_6618"><a href="ecmascript-data-types-and-values.html#sec-object-type">is not an Object</a></emu-xref>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return ?&nbsp;<emu-xref aoid="HasProperty" id="_ref_6619"><a href="abstract-operations.html#sec-hasproperty" class="e-user-code">HasProperty</a></emu-xref>(<var>rVal</var>, ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_6620"><a href="abstract-operations.html#sec-topropertykey" class="e-user-code">ToPropertyKey</a></emu-xref>(<var>lVal</var>)).</li></ol></emu-alg>
<emu-grammar><emu-production name="RelationalExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="bfkxjj0f" id="prod-00OK517S">
<emu-nt id="_ref_21072"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>
<emu-t>in</emu-t>
<emu-nt id="_ref_21073"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>privateIdentifier</var> be the <emu-xref aoid="StringValue" id="_ref_6621"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_21074"><a href="ecmascript-language-lexical-grammar.html#prod-PrivateIdentifier">PrivateIdentifier</a></emu-nt>.</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6622"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21075"><a href="ecmascript-language-expressions.html#prod-ShiftExpression">ShiftExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6623"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>If <var>rVal</var> <emu-xref href="#sec-object-type" id="_ref_6624"><a href="ecmascript-data-types-and-values.html#sec-object-type">is not an Object</a></emu-xref>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>privateEnv</var> be the <emu-xref href="#running-execution-context" id="_ref_6625"><a href="executable-code-and-execution-contexts.html#running-execution-context">running execution context</a></emu-xref>'s PrivateEnvironment.</li><li><emu-xref href="#assert" id="_ref_6626"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>privateEnv</var> is not <emu-val>null</emu-val>.</li><li>Let <var>privateName</var> be <emu-xref aoid="ResolvePrivateIdentifier" id="_ref_6627"><a href="executable-code-and-execution-contexts.html#sec-resolve-private-identifier">ResolvePrivateIdentifier</a></emu-xref>(<var>privateEnv</var>, <var>privateIdentifier</var>).</li><li>If <emu-xref aoid="PrivateElementFind" id="_ref_6628"><a href="abstract-operations.html#sec-privateelementfind">PrivateElementFind</a></emu-xref>(<var>rVal</var>, <var>privateName</var>) is <emu-const>empty</emu-const>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-instanceofoperator" type="abstract operation" aoid="InstanceofOperator">
<h1><span class="secnum">13.10.2</span> InstanceofOperator ( <var>V</var>, <var>target</var> )</h1>
<p>The abstract operation InstanceofOperator takes arguments <var>V</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6629"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>) and <var>target</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6630"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6631"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> a Boolean or a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6632"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">throw completion</a></emu-xref>. It implements the generic algorithm for determining if <var>V</var> is an instance of <var>target</var> either by consulting <var>target</var>'s <emu-xref href="#sec-well-known-symbols" id="_ref_6633"><a href="ecmascript-data-types-and-values.html#sec-well-known-symbols">%Symbol.hasInstance%</a></emu-xref> method or, if absent, determining whether the value of <var>target</var>'s <emu-val>"prototype"</emu-val> property is present in <var>V</var>'s prototype chain. It performs the following steps when called:</p>
<emu-alg><ol><li>If <var>target</var> <emu-xref href="#sec-object-type" id="_ref_6634"><a href="ecmascript-data-types-and-values.html#sec-object-type">is not an Object</a></emu-xref>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>instOfHandler</var> be ?&nbsp;<emu-xref aoid="GetMethod" id="_ref_6635"><a href="abstract-operations.html#sec-getmethod" class="e-user-code">GetMethod</a></emu-xref>(<var>target</var>, <emu-xref href="#sec-well-known-symbols" id="_ref_6636"><a href="ecmascript-data-types-and-values.html#sec-well-known-symbols">%Symbol.hasInstance%</a></emu-xref>).</li><li>If <var>instOfHandler</var> is not <emu-val>undefined</emu-val>, then<ol><li>Return <emu-xref aoid="ToBoolean" id="_ref_6637"><a href="abstract-operations.html#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call" id="_ref_6638"><a href="abstract-operations.html#sec-call" class="e-user-code">Call</a></emu-xref>(<var>instOfHandler</var>, <var>target</var>, « <var>V</var>&nbsp;»)).</li></ol></li><li id="step-instanceof-check-function">If <emu-xref aoid="IsCallable" id="_ref_6639"><a href="abstract-operations.html#sec-iscallable">IsCallable</a></emu-xref>(<var>target</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li id="step-instanceof-fallback">Return ?&nbsp;<emu-xref aoid="OrdinaryHasInstance" id="_ref_6640"><a href="abstract-operations.html#sec-ordinaryhasinstance" class="e-user-code">OrdinaryHasInstance</a></emu-xref>(<var>target</var>, <var>V</var>).</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Steps <emu-xref href="#step-instanceof-check-function" id="_ref_425"><a href="ecmascript-language-expressions.html#step-instanceof-check-function">4</a></emu-xref> and <emu-xref href="#step-instanceof-fallback" id="_ref_426"><a href="ecmascript-language-expressions.html#step-instanceof-fallback">5</a></emu-xref> provide compatibility with previous editions of ECMAScript that did not use a <emu-xref href="#sec-well-known-symbols" id="_ref_6641"><a href="ecmascript-data-types-and-values.html#sec-well-known-symbols">%Symbol.hasInstance%</a></emu-xref> method to define the <code>instanceof</code> operator semantics. If an object does not define or inherit <emu-xref href="#sec-well-known-symbols" id="_ref_6642"><a href="ecmascript-data-types-and-values.html#sec-well-known-symbols">%Symbol.hasInstance%</a></emu-xref> it uses the default <code>instanceof</code> semantics.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-equality-operators">
<h1><span class="secnum">13.11</span> Equality Operators</h1>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>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.</p>
</div></emu-note>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="EqualityExpression" params="In, Yield, Await" id="prod-EqualityExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="kobejffm">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21076"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="jxpsr3d-" id="prod-UHCaQLr6">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21077"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>==</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21078"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="ipid5oaz" id="prod-J7HEcFq2">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21079"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>!=</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21080"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="f7clru0r" id="prod-ugTHi1aM">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21081"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>===</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21082"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="n5bw_4at" id="prod-6Ta8WxmN">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21083"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>!==</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21084"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-equality-operators-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.11.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="EqualityExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="dxo0lfgu" id="prod-EO4eBsqd">
<emu-nt id="_ref_21085"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>
<emu-t>==</emu-t>
<emu-nt id="_ref_21086"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6643"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21087"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6644"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6645"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21088"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6646"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Return ?&nbsp;<emu-xref aoid="IsLooselyEqual" id="_ref_6647"><a href="abstract-operations.html#sec-islooselyequal" class="e-user-code">IsLooselyEqual</a></emu-xref>(<var>rVal</var>, <var>lVal</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="EqualityExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="cn2twrby" id="prod-zS10Lrlo">
<emu-nt id="_ref_21089"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>
<emu-t>!=</emu-t>
<emu-nt id="_ref_21090"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6648"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21091"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6649"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6650"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21092"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6651"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Let <var>r</var> be ?&nbsp;<emu-xref aoid="IsLooselyEqual" id="_ref_6652"><a href="abstract-operations.html#sec-islooselyequal" class="e-user-code">IsLooselyEqual</a></emu-xref>(<var>rVal</var>, <var>lVal</var>).</li><li>If <var>r</var> is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></emu-alg>
<emu-grammar><emu-production name="EqualityExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="4hu79ipe" id="prod-gVfoAVuz">
<emu-nt id="_ref_21093"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>
<emu-t>===</emu-t>
<emu-nt id="_ref_21094"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6653"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21095"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6654"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6655"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21096"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6656"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Return <emu-xref aoid="IsStrictlyEqual" id="_ref_6657"><a href="abstract-operations.html#sec-isstrictlyequal">IsStrictlyEqual</a></emu-xref>(<var>rVal</var>, <var>lVal</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="EqualityExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="irptryux" id="prod-q4vp8E6E">
<emu-nt id="_ref_21097"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>
<emu-t>!==</emu-t>
<emu-nt id="_ref_21098"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6658"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21099"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6659"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6660"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21100"><a href="ecmascript-language-expressions.html#prod-RelationalExpression">RelationalExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6661"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Let <var>r</var> be <emu-xref aoid="IsStrictlyEqual" id="_ref_6662"><a href="abstract-operations.html#sec-isstrictlyequal">IsStrictlyEqual</a></emu-xref>(<var>rVal</var>, <var>lVal</var>).</li><li>If <var>r</var> is <emu-val>true</emu-val>, return <emu-val>false</emu-val>.</li><li>Return <emu-val>true</emu-val>.</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>The equality operators maintain the following invariants:</p>
<ul>
<li>
<code>A != B</code> is equivalent to <code>!(A == B)</code>.
</li>
<li>
<code>A == B</code> is equivalent to <code>B == A</code>, except in the order of evaluation of <code>A</code> and <code>B</code>.
</li>
</ul>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>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 <code>==</code> operator, but the two String objects would not be equal to each other. For example:</p>
<ul>
<li>
<code>new String("a") == "a"</code> and <code>"a" == new String("a")</code> are both <emu-val>true</emu-val>.
</li>
<li>
<code>new String("a") == new String("a")</code> is <emu-val>false</emu-val>.
</li>
</ul>
</div></emu-note>
<emu-note><span class="note">Note 3</span><div class="note-contents">
<p>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.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-binary-bitwise-operators">
<h1><span class="secnum">13.12</span> Binary Bitwise Operators</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="BitwiseANDExpression" params="In, Yield, Await" id="prod-BitwiseANDExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-BitwiseANDExpression">BitwiseANDExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="xfq7h3dt">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21101"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="lp9tp43u" id="prod-wrUN23HO">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21102"><a href="ecmascript-language-expressions.html#prod-BitwiseANDExpression">BitwiseANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&amp;</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21103"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="BitwiseXORExpression" params="In, Yield, Await" id="prod-BitwiseXORExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-BitwiseXORExpression">BitwiseXORExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="qmrxjqqk">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21104"><a href="ecmascript-language-expressions.html#prod-BitwiseANDExpression">BitwiseANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="1xjkk1wc" id="prod-9YKtCpIQ">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21105"><a href="ecmascript-language-expressions.html#prod-BitwiseXORExpression">BitwiseXORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>^</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21106"><a href="ecmascript-language-expressions.html#prod-BitwiseANDExpression">BitwiseANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="BitwiseORExpression" params="In, Yield, Await" id="prod-BitwiseORExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="joxsfj33">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21107"><a href="ecmascript-language-expressions.html#prod-BitwiseXORExpression">BitwiseXORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="rqrhqzr9" id="prod-AgJdAkQg">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21108"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>|</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21109"><a href="ecmascript-language-expressions.html#prod-BitwiseXORExpression">BitwiseXORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-binary-bitwise-operators-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.12.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="BitwiseANDExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="qq3twiws" id="prod-_rEQOot5">
<emu-nt id="_ref_21110"><a href="ecmascript-language-expressions.html#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt>
<emu-t>&amp;</emu-t>
<emu-nt id="_ref_21111"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6663"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_21112"><a href="ecmascript-language-expressions.html#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt>, <code>&amp;</code>, <emu-nt id="_ref_21113"><a href="ecmascript-language-expressions.html#prod-EqualityExpression">EqualityExpression</a></emu-nt>).</li></ol></emu-alg>
<emu-grammar><emu-production name="BitwiseXORExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="tgmxlg5x" id="prod-Q4tADXpb">
<emu-nt id="_ref_21114"><a href="ecmascript-language-expressions.html#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt>
<emu-t>^</emu-t>
<emu-nt id="_ref_21115"><a href="ecmascript-language-expressions.html#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6664"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_21116"><a href="ecmascript-language-expressions.html#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt>, <code>^</code>, <emu-nt id="_ref_21117"><a href="ecmascript-language-expressions.html#prod-BitwiseANDExpression">BitwiseANDExpression</a></emu-nt>).</li></ol></emu-alg>
<emu-grammar><emu-production name="BitwiseORExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="aw36khwc" id="prod-KiqD724B">
<emu-nt id="_ref_21118"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt>
<emu-t>|</emu-t>
<emu-nt id="_ref_21119"><a href="ecmascript-language-expressions.html#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="EvaluateStringOrNumericBinaryExpression" id="_ref_6665"><a href="ecmascript-language-expressions.html#sec-evaluatestringornumericbinaryexpression" class="e-user-code">EvaluateStringOrNumericBinaryExpression</a></emu-xref>(<emu-nt id="_ref_21120"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt>, <code>|</code>, <emu-nt id="_ref_21121"><a href="ecmascript-language-expressions.html#prod-BitwiseXORExpression">BitwiseXORExpression</a></emu-nt>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-binary-logical-operators">
<h1><span class="secnum">13.13</span> Binary Logical Operators</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="LogicalANDExpression" params="In, Yield, Await" id="prod-LogicalANDExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-LogicalANDExpression">LogicalANDExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="c_3moriv">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21122"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="goip25p_" id="prod-vZbQbZtn">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21123"><a href="ecmascript-language-expressions.html#prod-LogicalANDExpression">LogicalANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&amp;&amp;</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21124"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="LogicalORExpression" params="In, Yield, Await" id="prod-LogicalORExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-LogicalORExpression">LogicalORExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="uibyaiez">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21125"><a href="ecmascript-language-expressions.html#prod-LogicalANDExpression">LogicalANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="j2ugmrmi" id="prod-ACEMYh2d">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21126"><a href="ecmascript-language-expressions.html#prod-LogicalORExpression">LogicalORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>||</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21127"><a href="ecmascript-language-expressions.html#prod-LogicalANDExpression">LogicalANDExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="CoalesceExpression" params="In, Yield, Await" id="prod-CoalesceExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-CoalesceExpression">CoalesceExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0m-knz7v" id="prod-au86anjM">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21128"><a href="ecmascript-language-expressions.html#prod-CoalesceExpressionHead">CoalesceExpressionHead</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>??</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21129"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="CoalesceExpressionHead" params="In, Yield, Await" id="prod-CoalesceExpressionHead">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-CoalesceExpressionHead">CoalesceExpressionHead</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="yrl3tdye">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21130"><a href="ecmascript-language-expressions.html#prod-CoalesceExpression">CoalesceExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="c_3moriv">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21131"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="ShortCircuitExpression" params="In, Yield, Await" id="prod-ShortCircuitExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-ShortCircuitExpression">ShortCircuitExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="cubbqwpr">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21132"><a href="ecmascript-language-expressions.html#prod-LogicalORExpression">LogicalORExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="yrl3tdye">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21133"><a href="ecmascript-language-expressions.html#prod-CoalesceExpression">CoalesceExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The value produced by a <code>&amp;&amp;</code> or <code>||</code> operator is not necessarily of type Boolean. The value produced will always be the value of one of the two operand expressions.</p>
</div></emu-note>
<emu-clause id="sec-binary-logical-operators-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.13.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="LogicalANDExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="iybiqszh" id="prod-7s2sQWPJ">
<emu-nt id="_ref_21134"><a href="ecmascript-language-expressions.html#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt>
<emu-t>&amp;&amp;</emu-t>
<emu-nt id="_ref_21135"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6666"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21136"><a href="ecmascript-language-expressions.html#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6667"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>If <emu-xref aoid="ToBoolean" id="_ref_6668"><a href="abstract-operations.html#sec-toboolean">ToBoolean</a></emu-xref>(<var>lVal</var>) is <emu-val>false</emu-val>, return <var>lVal</var>.</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6669"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21137"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6670"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="LogicalORExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-LogicalORExpression">LogicalORExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="tku92t5q" id="prod-3FN9c95J">
<emu-nt id="_ref_21138"><a href="ecmascript-language-expressions.html#prod-LogicalORExpression">LogicalORExpression</a></emu-nt>
<emu-t>||</emu-t>
<emu-nt id="_ref_21139"><a href="ecmascript-language-expressions.html#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6671"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21140"><a href="ecmascript-language-expressions.html#prod-LogicalORExpression">LogicalORExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6672"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>If <emu-xref aoid="ToBoolean" id="_ref_6673"><a href="abstract-operations.html#sec-toboolean">ToBoolean</a></emu-xref>(<var>lVal</var>) is <emu-val>true</emu-val>, return <var>lVal</var>.</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6674"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21141"><a href="ecmascript-language-expressions.html#prod-LogicalANDExpression">LogicalANDExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6675"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li></ol></emu-alg>
<emu-grammar><emu-production name="CoalesceExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-CoalesceExpression">CoalesceExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="3eoigfmu" id="prod-VuyYXoKA">
<emu-nt id="_ref_21142"><a href="ecmascript-language-expressions.html#prod-CoalesceExpressionHead">CoalesceExpressionHead</a></emu-nt>
<emu-t>??</emu-t>
<emu-nt id="_ref_21143"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6676"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21144"><a href="ecmascript-language-expressions.html#prod-CoalesceExpressionHead">CoalesceExpressionHead</a></emu-nt>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6677"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>If <var>lVal</var> is neither <emu-val>undefined</emu-val> nor <emu-val>null</emu-val>, return <var>lVal</var>.</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6678"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21145"><a href="ecmascript-language-expressions.html#prod-BitwiseORExpression">BitwiseORExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6679"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-conditional-operator">
<h1><span class="secnum">13.14</span> Conditional Operator ( <code>? :</code> )</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="ConditionalExpression" params="In, Yield, Await" id="prod-ConditionalExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-ConditionalExpression">ConditionalExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="hb3dzpk6">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21146"><a href="ecmascript-language-expressions.html#prod-ShortCircuitExpression">ShortCircuitExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="hgxirk7b" id="prod-mR1mZxSc">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21147"><a href="ecmascript-language-expressions.html#prod-ShortCircuitExpression">ShortCircuitExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>?</emu-t>
<emu-nt params="+In, ?Yield, ?Await" id="_ref_21148"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>:</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21149"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The grammar for a <emu-nt id="_ref_21150"><a href="ecmascript-language-expressions.html#prod-ConditionalExpression">ConditionalExpression</a></emu-nt> in ECMAScript is slightly different from that in C and Java, which each allow the second subexpression to be an <emu-nt id="_ref_21151"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt> but restrict the third expression to be a <emu-nt id="_ref_21152"><a href="ecmascript-language-expressions.html#prod-ConditionalExpression">ConditionalExpression</a></emu-nt>. The motivation for this difference in ECMAScript is to allow an assignment expression to be governed by either arm of a conditional and to eliminate the confusing and fairly useless case of a comma expression as the centre expression.</p>
</div></emu-note>
<emu-clause id="sec-conditional-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.14.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ConditionalExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ConditionalExpression">ConditionalExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="d4vlxget" id="prod-yhd-4Qj-">
<emu-nt id="_ref_21153"><a href="ecmascript-language-expressions.html#prod-ShortCircuitExpression">ShortCircuitExpression</a></emu-nt>
<emu-t>?</emu-t>
<emu-nt id="_ref_21154"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
<emu-t>:</emu-t>
<emu-nt id="_ref_21155"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6680"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21156"><a href="ecmascript-language-expressions.html#prod-ShortCircuitExpression">ShortCircuitExpression</a></emu-nt>.</li><li>Let <var>lVal</var> be <emu-xref aoid="ToBoolean" id="_ref_6681"><a href="abstract-operations.html#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="GetValue" id="_ref_6682"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>)).</li><li>If <var>lVal</var> is <emu-val>true</emu-val>, then<ol><li>Let <var>trueRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6683"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of the first <emu-nt id="_ref_21157"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6684"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>trueRef</var>).</li></ol></li><li>Let <var>falseRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6685"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of the second <emu-nt id="_ref_21158"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6686"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>falseRef</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-assignment-operators">
<h1><span class="secnum">13.15</span> Assignment Operators</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="AssignmentExpression" params="In, Yield, Await" id="prod-AssignmentExpression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gqos3l-s">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21159"><a href="ecmascript-language-expressions.html#prod-ConditionalExpression">ConditionalExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="xu2tbseh" constraints="+Yield" id="prod-wU5Xsk6s"><emu-constraints>[+Yield]</emu-constraints>
<emu-nt params="?In, ?Await" id="_ref_21160"><a href="ecmascript-language-functions-and-classes.html#prod-YieldExpression">YieldExpression</a><emu-mods><emu-params>[?In, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="m23qgn_1" id="prod-nUwhqikN">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21161"><a href="ecmascript-language-functions-and-classes.html#prod-ArrowFunction">ArrowFunction</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="3h9r6dls" id="prod-iYk5nCgu">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21162"><a href="ecmascript-language-functions-and-classes.html#prod-AsyncArrowFunction">AsyncArrowFunction</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="assignment" id="prod-eXKFjh2J">
<emu-nt params="?Yield, ?Await" id="_ref_21163"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>=</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21164"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="3cvjfmjy" id="prod-shfKC2mw">
<emu-nt params="?Yield, ?Await" id="_ref_21165"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt id="_ref_21166"><a href="ecmascript-language-expressions.html#prod-AssignmentOperator">AssignmentOperator</a></emu-nt>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21167"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="3bbinvbh" id="prod-hQLdzapj">
<emu-nt params="?Yield, ?Await" id="_ref_21168"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>&amp;&amp;=</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21169"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="kvjhbccb" id="prod-w-48XpMo">
<emu-nt params="?Yield, ?Await" id="_ref_21170"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>||=</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21171"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="cwe0lpyb" id="prod-7NM9KEaO">
<emu-nt params="?Yield, ?Await" id="_ref_21172"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>??=</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21173"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="AssignmentOperator" oneof="" id="prod-AssignmentOperator">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentOperator">AssignmentOperator</a></emu-nt> <emu-geq>:</emu-geq> <emu-oneof>one of</emu-oneof> <emu-rhs><emu-t>*=</emu-t> <emu-t>/=</emu-t> <emu-t>%=</emu-t> <emu-t>+=</emu-t> <emu-t>-=</emu-t> <emu-t>&lt;&lt;=</emu-t> <emu-t>&gt;&gt;=</emu-t> <emu-t>&gt;&gt;&gt;=</emu-t> <emu-t>&amp;=</emu-t> <emu-t>^=</emu-t> <emu-t>|=</emu-t> <emu-t>**=</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-assignment-operators-static-semantics-early-errors">
<h1><span class="secnum">13.15.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ijpo4eaq">
<emu-nt id="_ref_21174"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>=</emu-t>
<emu-nt id="_ref_21175"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
If <emu-nt id="_ref_21176"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is either an <emu-nt id="_ref_21177"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_21178"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, <emu-nt id="_ref_21179"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> <emu-xref href="#must-cover" id="_ref_6687"><a href="notational-conventions.html#must-cover">must cover</a></emu-xref> an <emu-nt id="_ref_21180"><a href="ecmascript-language-expressions.html#prod-AssignmentPattern">AssignmentPattern</a></emu-nt>.
</li>
<li>
If <emu-nt id="_ref_21181"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is neither an <emu-nt id="_ref_21182"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_21183"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, it is a Syntax Error if the <emu-xref aoid="AssignmentTargetType" id="_ref_6688"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_21184"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>invalid</emu-const>.
</li>
</ul>
<emu-grammar><emu-production name="AssignmentExpression">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="xzqhr---">
<emu-nt id="_ref_21185"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-nt id="_ref_21186"><a href="ecmascript-language-expressions.html#prod-AssignmentOperator">AssignmentOperator</a></emu-nt>
<emu-nt id="_ref_21187"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the <emu-xref aoid="AssignmentTargetType" id="_ref_6689"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_21188"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>invalid</emu-const>.
</li>
</ul>
<emu-grammar><emu-production name="AssignmentExpression">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="devkzibl">
<emu-nt id="_ref_21189"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>&amp;&amp;=</emu-t>
<emu-nt id="_ref_21190"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
<emu-rhs a="dt1frwiy">
<emu-nt id="_ref_21191"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>||=</emu-t>
<emu-nt id="_ref_21192"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
<emu-rhs a="dbifpqxa">
<emu-nt id="_ref_21193"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>??=</emu-t>
<emu-nt id="_ref_21194"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the <emu-xref aoid="AssignmentTargetType" id="_ref_6690"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_21195"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is not <emu-const>simple</emu-const>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-assignment-operators-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.15.2</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ijpo4eaq" id="prod-dpJd5ekV">
<emu-nt id="_ref_21196"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>=</emu-t>
<emu-nt id="_ref_21197"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_21198"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is neither an <emu-nt id="_ref_21199"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_21200"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6691"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21201"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>If the <emu-xref aoid="AssignmentTargetType" id="_ref_6692"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_21202"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>web-compat</emu-const>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_6693"><a href="syntax-directed-operations.html#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_21203"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>) is <emu-val>true</emu-val> and <emu-xref aoid="IsIdentifierRef" id="_ref_6694"><a href="syntax-directed-operations.html#sec-static-semantics-isidentifierref">IsIdentifierRef</a></emu-xref> of <emu-nt id="_ref_21204"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-val>true</emu-val>, then<ol><li>Let <var>lhs</var> be the <emu-xref aoid="StringValue" id="_ref_6695"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_21205"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="NamedEvaluation" id="_ref_6696"><a href="syntax-directed-operations.html#sec-runtime-semantics-namedevaluation" class="e-user-code">NamedEvaluation</a></emu-xref> of <emu-nt id="_ref_21206"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>lhs</var>.</li></ol></li><li>Else,<ol><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6697"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21207"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6698"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li></ol></li><li id="step-assignmentexpression-evaluation-simple-putvalue">Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6699"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>rVal</var>).</li><li>Return <var>rVal</var>.</li></ol></li><li>Let <var>assignmentPattern</var> be the <emu-nt id="_ref_21208"><a href="ecmascript-language-expressions.html#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_6700"><a href="notational-conventions.html#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_21209"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6701"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21210"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6702"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="DestructuringAssignmentEvaluation" id="_ref_6703"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-destructuringassignmentevaluation" class="e-user-code">DestructuringAssignmentEvaluation</a></emu-xref> of <var>assignmentPattern</var> with argument <var>rVal</var>.</li><li>Return <var>rVal</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="xzqhr---" id="prod-d86UjzUy">
<emu-nt id="_ref_21211"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-nt id="_ref_21212"><a href="ecmascript-language-expressions.html#prod-AssignmentOperator">AssignmentOperator</a></emu-nt>
<emu-nt id="_ref_21213"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6704"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21214"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>If the <emu-xref aoid="AssignmentTargetType" id="_ref_6705"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_21215"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-const>web-compat</emu-const>, throw a <emu-val>ReferenceError</emu-val> exception.</li><li id="step-assignmentexpression-evaluation-compound-getvalue">Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6706"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6707"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21216"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6708"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Let <var>assignmentOpText</var> be the <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6709"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">source text matched by</a></emu-xref> <emu-nt id="_ref_21217"><a href="ecmascript-language-expressions.html#prod-AssignmentOperator">AssignmentOperator</a></emu-nt>.</li><li>Let <var>opText</var> be the sequence of Unicode code points associated with <var>assignmentOpText</var> in the following table:
<figure>
<!-- emu-format ignore -->
<table class="lightweight-table">
<thead>
<tr><th> <var>assignmentOpText</var> </th><th> <var>opText</var> </th></tr>
</thead>
<tbody><tr><td> <code>**=</code> </td><td> <code>**</code> </td></tr>
<tr><td> <code>*=</code> </td><td> <code>*</code> </td></tr>
<tr><td> <code>/=</code> </td><td> <code>/</code> </td></tr>
<tr><td> <code>%=</code> </td><td> <code>%</code> </td></tr>
<tr><td> <code>+=</code> </td><td> <code>+</code> </td></tr>
<tr><td> <code>-=</code> </td><td> <code>-</code> </td></tr>
<tr><td> <code>&lt;&lt;=</code> </td><td> <code>&lt;&lt;</code> </td></tr>
<tr><td> <code>&gt;&gt;=</code> </td><td> <code>&gt;&gt;</code> </td></tr>
<tr><td> <code>&gt;&gt;&gt;=</code> </td><td> <code>&gt;&gt;&gt;</code> </td></tr>
<tr><td> <code>&amp;=</code> </td><td> <code>&amp;</code> </td></tr>
<tr><td> <code>^=</code> </td><td> <code>^</code> </td></tr>
<tr><td> <code>|=</code> </td><td> <code>|</code> </td></tr>
</tbody></table>
</figure></li><li>Let <var>r</var> be ?&nbsp;<emu-xref aoid="ApplyStringOrNumericBinaryOperator" id="_ref_6710"><a href="ecmascript-language-expressions.html#sec-applystringornumericbinaryoperator" class="e-user-code">ApplyStringOrNumericBinaryOperator</a></emu-xref>(<var>lVal</var>, <var>opText</var>, <var>rVal</var>).</li><li id="step-assignmentexpression-evaluation-compound-putvalue">Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6711"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>r</var>).</li><li>Return <var>r</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="devkzibl" id="prod-tjCiSw-h">
<emu-nt id="_ref_21218"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>&amp;&amp;=</emu-t>
<emu-nt id="_ref_21219"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6712"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21220"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li id="step-assignmentexpression-evaluation-lgcl-and-getvalue">Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6713"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>If <emu-xref aoid="ToBoolean" id="_ref_6714"><a href="abstract-operations.html#sec-toboolean">ToBoolean</a></emu-xref>(<var>lVal</var>) is <emu-val>false</emu-val>, return <var>lVal</var>.</li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_6715"><a href="syntax-directed-operations.html#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_21221"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>) is <emu-val>true</emu-val> and <emu-xref aoid="IsIdentifierRef" id="_ref_6716"><a href="syntax-directed-operations.html#sec-static-semantics-isidentifierref">IsIdentifierRef</a></emu-xref> of <emu-nt id="_ref_21222"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-val>true</emu-val>, then<ol><li>Let <var>lhs</var> be the <emu-xref aoid="StringValue" id="_ref_6717"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_21223"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="NamedEvaluation" id="_ref_6718"><a href="syntax-directed-operations.html#sec-runtime-semantics-namedevaluation" class="e-user-code">NamedEvaluation</a></emu-xref> of <emu-nt id="_ref_21224"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>lhs</var>.</li></ol></li><li>Else,<ol><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6719"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21225"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6720"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li></ol></li><li id="step-assignmentexpression-evaluation-lgcl-and-putvalue">Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6721"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>rVal</var>).</li><li>Return <var>rVal</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="dt1frwiy" id="prod-H705EMCV">
<emu-nt id="_ref_21226"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>||=</emu-t>
<emu-nt id="_ref_21227"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6722"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21228"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li id="step-assignmentexpression-evaluation-lgcl-or-getvalue">Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6723"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>If <emu-xref aoid="ToBoolean" id="_ref_6724"><a href="abstract-operations.html#sec-toboolean">ToBoolean</a></emu-xref>(<var>lVal</var>) is <emu-val>true</emu-val>, return <var>lVal</var>.</li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_6725"><a href="syntax-directed-operations.html#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_21229"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>) is <emu-val>true</emu-val> and <emu-xref aoid="IsIdentifierRef" id="_ref_6726"><a href="syntax-directed-operations.html#sec-static-semantics-isidentifierref">IsIdentifierRef</a></emu-xref> of <emu-nt id="_ref_21230"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-val>true</emu-val>, then<ol><li>Let <var>lhs</var> be the <emu-xref aoid="StringValue" id="_ref_6727"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_21231"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="NamedEvaluation" id="_ref_6728"><a href="syntax-directed-operations.html#sec-runtime-semantics-namedevaluation" class="e-user-code">NamedEvaluation</a></emu-xref> of <emu-nt id="_ref_21232"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>lhs</var>.</li></ol></li><li>Else,<ol><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6729"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21233"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6730"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li></ol></li><li id="step-assignmentexpression-evaluation-lgcl-or-putvalue">Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6731"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>rVal</var>).</li><li>Return <var>rVal</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="dbifpqxa" id="prod-ity5YYTe">
<emu-nt id="_ref_21234"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>??=</emu-t>
<emu-nt id="_ref_21235"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6732"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21236"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li id="step-assignmentexpression-evaluation-lgcl-nullish-getvalue">Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6733"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>If <var>lVal</var> is neither <emu-val>undefined</emu-val> nor <emu-val>null</emu-val>, return <var>lVal</var>.</li><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_6734"><a href="syntax-directed-operations.html#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_21237"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>) is <emu-val>true</emu-val> and <emu-xref aoid="IsIdentifierRef" id="_ref_6735"><a href="syntax-directed-operations.html#sec-static-semantics-isidentifierref">IsIdentifierRef</a></emu-xref> of <emu-nt id="_ref_21238"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is <emu-val>true</emu-val>, then<ol><li>Let <var>lhs</var> be the <emu-xref aoid="StringValue" id="_ref_6736"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_21239"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="NamedEvaluation" id="_ref_6737"><a href="syntax-directed-operations.html#sec-runtime-semantics-namedevaluation" class="e-user-code">NamedEvaluation</a></emu-xref> of <emu-nt id="_ref_21240"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> with argument <var>lhs</var>.</li></ol></li><li>Else,<ol><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6738"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21241"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6739"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li></ol></li><li id="step-assignmentexpression-evaluation-lgcl-nullish-putvalue">Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6740"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>rVal</var>).</li><li>Return <var>rVal</var>.</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>When this expression occurs within <emu-xref href="#sec-strict-mode-code" id="_ref_6741"><a href="ecmascript-language-source-code.html#sec-strict-mode-code">strict mode code</a></emu-xref>, it is a runtime error if <var>lRef</var> in step <emu-xref href="#step-assignmentexpression-evaluation-simple-putvalue" id="_ref_427"><a href="ecmascript-language-expressions.html#step-assignmentexpression-evaluation-simple-putvalue">1.e</a></emu-xref>, <emu-xref href="#step-assignmentexpression-evaluation-compound-getvalue" id="_ref_428"><a href="ecmascript-language-expressions.html#step-assignmentexpression-evaluation-compound-getvalue">3</a></emu-xref>, <emu-xref href="#step-assignmentexpression-evaluation-lgcl-and-getvalue" id="_ref_429"><a href="ecmascript-language-expressions.html#step-assignmentexpression-evaluation-lgcl-and-getvalue">2</a></emu-xref>, <emu-xref href="#step-assignmentexpression-evaluation-lgcl-or-getvalue" id="_ref_430"><a href="ecmascript-language-expressions.html#step-assignmentexpression-evaluation-lgcl-or-getvalue">2</a></emu-xref>, <emu-xref href="#step-assignmentexpression-evaluation-lgcl-nullish-getvalue" id="_ref_431"><a href="ecmascript-language-expressions.html#step-assignmentexpression-evaluation-lgcl-nullish-getvalue">2</a></emu-xref> is an unresolvable reference. If it is, a <emu-val>ReferenceError</emu-val> exception is thrown. Additionally, it is a runtime error if the <var>lRef</var> in step <emu-xref href="#step-assignmentexpression-evaluation-compound-putvalue" id="_ref_432"><a href="ecmascript-language-expressions.html#step-assignmentexpression-evaluation-compound-putvalue">9</a></emu-xref>, <emu-xref href="#step-assignmentexpression-evaluation-lgcl-and-putvalue" id="_ref_433"><a href="ecmascript-language-expressions.html#step-assignmentexpression-evaluation-lgcl-and-putvalue">6</a></emu-xref>, <emu-xref href="#step-assignmentexpression-evaluation-lgcl-or-putvalue" id="_ref_434"><a href="ecmascript-language-expressions.html#step-assignmentexpression-evaluation-lgcl-or-putvalue">6</a></emu-xref>, <emu-xref href="#step-assignmentexpression-evaluation-lgcl-nullish-putvalue" id="_ref_435"><a href="ecmascript-language-expressions.html#step-assignmentexpression-evaluation-lgcl-nullish-putvalue">6</a></emu-xref> is a reference to a <emu-xref href="#sec-object-type" id="_ref_6742"><a href="ecmascript-data-types-and-values.html#sec-object-type">data property</a></emu-xref> with the attribute value { <var class="field">[[Writable]]</var>: <emu-val>false</emu-val> }, to an <emu-xref href="#sec-object-type" id="_ref_6743"><a href="ecmascript-data-types-and-values.html#sec-object-type">accessor property</a></emu-xref> with the attribute value { <var class="field">[[Set]]</var>: <emu-val>undefined</emu-val> }, or to a non-existent property of an object for which the <emu-xref aoid="IsExtensible" id="_ref_6744"><a href="abstract-operations.html#sec-isextensible-o">IsExtensible</a></emu-xref> predicate returns the value <emu-val>false</emu-val>. In these cases a <emu-val>TypeError</emu-val> exception is thrown.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-applystringornumericbinaryoperator" type="abstract operation" aoid="ApplyStringOrNumericBinaryOperator">
<h1><span class="secnum">13.15.3</span> ApplyStringOrNumericBinaryOperator ( <var>lVal</var>, <var>opText</var>, <var>rVal</var> )</h1>
<p>The abstract operation ApplyStringOrNumericBinaryOperator takes arguments <var>lVal</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6745"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>), <var>opText</var> (<code>**</code>, <code>*</code>, <code>/</code>, <code>%</code>, <code>+</code>, <code>-</code>, <code>&lt;&lt;</code>, <code>&gt;&gt;</code>, <code>&gt;&gt;&gt;</code>, <code>&amp;</code>, <code>^</code>, or <code>|</code>), and <var>rVal</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6746"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6747"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> either a String, a BigInt, or a Number, or a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6748"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">throw completion</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>If <var>opText</var> is <code>+</code>, then<ol><li id="step-binary-op-toprimitive-lval">Let <var>lPrim</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_6749"><a href="abstract-operations.html#sec-toprimitive" class="e-user-code">ToPrimitive</a></emu-xref>(<var>lVal</var>).</li><li id="step-binary-op-toprimitive-rval">Let <var>rPrim</var> be ?&nbsp;<emu-xref aoid="ToPrimitive" id="_ref_6750"><a href="abstract-operations.html#sec-toprimitive" class="e-user-code">ToPrimitive</a></emu-xref>(<var>rVal</var>).</li><li id="step-binary-op-string-check">If <var>lPrim</var> <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6751"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-string-type">is a String</a></emu-xref> or <var>rPrim</var> <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_6752"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-string-type">is a String</a></emu-xref>, then<ol><li>Let <var>lStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6753"><a href="abstract-operations.html#sec-tostring" class="e-user-code">ToString</a></emu-xref>(<var>lPrim</var>).</li><li>Let <var>rStr</var> be ?&nbsp;<emu-xref aoid="ToString" id="_ref_6754"><a href="abstract-operations.html#sec-tostring" class="e-user-code">ToString</a></emu-xref>(<var>rPrim</var>).</li><li>Return the <emu-xref href="#string-concatenation" id="_ref_6755"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of <var>lStr</var> and <var>rStr</var>.</li></ol></li><li>Set <var>lVal</var> to <var>lPrim</var>.</li><li>Set <var>rVal</var> to <var>rPrim</var>.</li></ol></li><li>NOTE: At this point, it must be a numeric operation.</li><li>Let <var>lNum</var> be ?&nbsp;<emu-xref aoid="ToNumeric" id="_ref_6756"><a href="abstract-operations.html#sec-tonumeric" class="e-user-code">ToNumeric</a></emu-xref>(<var>lVal</var>).</li><li>Let <var>rNum</var> be ?&nbsp;<emu-xref aoid="ToNumeric" id="_ref_6757"><a href="abstract-operations.html#sec-tonumeric" class="e-user-code">ToNumeric</a></emu-xref>(<var>rVal</var>).</li><li>If <emu-xref aoid="SameType" id="_ref_6758"><a href="abstract-operations.html#sec-sametype">SameType</a></emu-xref>(<var>lNum</var>, <var>rNum</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>lNum</var> <emu-xref href="#sec-ecmascript-language-types-bigint-type" id="_ref_6759"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-bigint-type">is a BigInt</a></emu-xref>, then<ol><li>If <var>opText</var> is <code>**</code>, return ?&nbsp;<emu-xref aoid="BigInt::exponentiate" id="_ref_6760"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-exponentiate">BigInt::exponentiate</a></emu-xref>(<var>lNum</var>, <var>rNum</var>).</li><li>If <var>opText</var> is <code>/</code>, return ?&nbsp;<emu-xref aoid="BigInt::divide" id="_ref_6761"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-divide">BigInt::divide</a></emu-xref>(<var>lNum</var>, <var>rNum</var>).</li><li>If <var>opText</var> is <code>%</code>, return ?&nbsp;<emu-xref aoid="BigInt::remainder" id="_ref_6762"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-remainder">BigInt::remainder</a></emu-xref>(<var>lNum</var>, <var>rNum</var>).</li><li>If <var>opText</var> is <code>&gt;&gt;&gt;</code>, return ?&nbsp;<emu-xref aoid="BigInt::unsignedRightShift" id="_ref_6763"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-unsignedRightShift">BigInt::unsignedRightShift</a></emu-xref>(<var>lNum</var>, <var>rNum</var>).</li><li>Let <var>operation</var> be the abstract operation associated with <var>opText</var> in the following table:
<figure>
<!-- emu-format ignore -->
<table class="lightweight-table">
<thead>
<tr><th> <var>opText</var> </th><th> <var>operation</var> </th></tr>
</thead>
<tbody>
<tr><td> <code>*</code> </td><td> <emu-xref aoid="BigInt::multiply" id="_ref_6764"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-multiply">BigInt::multiply</a></emu-xref> </td></tr>
<tr><td> <code>+</code> </td><td> <emu-xref aoid="BigInt::add" id="_ref_6765"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-add">BigInt::add</a></emu-xref> </td></tr>
<tr><td> <code>-</code> </td><td> <emu-xref aoid="BigInt::subtract" id="_ref_6766"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-subtract">BigInt::subtract</a></emu-xref> </td></tr>
<tr><td> <code>&lt;&lt;</code> </td><td> <emu-xref aoid="BigInt::leftShift" id="_ref_6767"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-leftShift">BigInt::leftShift</a></emu-xref> </td></tr>
<tr><td> <code>&gt;&gt;</code> </td><td> <emu-xref aoid="BigInt::signedRightShift" id="_ref_6768"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-signedRightShift">BigInt::signedRightShift</a></emu-xref> </td></tr>
<tr><td> <code>&amp;</code> </td><td> <emu-xref aoid="BigInt::bitwiseAND" id="_ref_6769"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-bitwiseAND">BigInt::bitwiseAND</a></emu-xref> </td></tr>
<tr><td> <code>^</code> </td><td> <emu-xref aoid="BigInt::bitwiseXOR" id="_ref_6770"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-bitwiseXOR">BigInt::bitwiseXOR</a></emu-xref> </td></tr>
<tr><td> <code>|</code> </td><td> <emu-xref aoid="BigInt::bitwiseOR" id="_ref_6771"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-bigint-bitwiseOR">BigInt::bitwiseOR</a></emu-xref> </td></tr>
</tbody>
</table>
</figure></li></ol></li><li>Else,<ol><li><emu-xref href="#assert" id="_ref_6772"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>lNum</var> <emu-xref href="#sec-ecmascript-language-types-number-type" id="_ref_6773"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-number-type">is a Number</a></emu-xref>.</li><li>Let <var>operation</var> be the abstract operation associated with <var>opText</var> in the following table:
<figure>
<!-- emu-format ignore -->
<table class="lightweight-table">
<thead>
<tr><th> <var>opText</var> </th><th> <var>operation</var> </th></tr>
</thead>
<tbody>
<tr><td> <code>**</code> </td><td> <emu-xref aoid="Number::exponentiate" id="_ref_6774"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-exponentiate">Number::exponentiate</a></emu-xref> </td></tr>
<tr><td> <code>*</code> </td><td> <emu-xref aoid="Number::multiply" id="_ref_6775"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-multiply">Number::multiply</a></emu-xref> </td></tr>
<tr><td> <code>/</code> </td><td> <emu-xref aoid="Number::divide" id="_ref_6776"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-divide">Number::divide</a></emu-xref> </td></tr>
<tr><td> <code>%</code> </td><td> <emu-xref aoid="Number::remainder" id="_ref_6777"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-remainder">Number::remainder</a></emu-xref> </td></tr>
<tr><td> <code>+</code> </td><td> <emu-xref aoid="Number::add" id="_ref_6778"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-add">Number::add</a></emu-xref> </td></tr>
<tr><td> <code>-</code> </td><td> <emu-xref aoid="Number::subtract" id="_ref_6779"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-subtract">Number::subtract</a></emu-xref> </td></tr>
<tr><td> <code>&lt;&lt;</code> </td><td> <emu-xref aoid="Number::leftShift" id="_ref_6780"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-leftShift">Number::leftShift</a></emu-xref> </td></tr>
<tr><td> <code>&gt;&gt;</code> </td><td> <emu-xref aoid="Number::signedRightShift" id="_ref_6781"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-signedRightShift">Number::signedRightShift</a></emu-xref> </td></tr>
<tr><td> <code>&gt;&gt;&gt;</code> </td><td> <emu-xref aoid="Number::unsignedRightShift" id="_ref_6782"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-unsignedRightShift">Number::unsignedRightShift</a></emu-xref> </td></tr>
<tr><td> <code>&amp;</code> </td><td> <emu-xref aoid="Number::bitwiseAND" id="_ref_6783"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-bitwiseAND">Number::bitwiseAND</a></emu-xref> </td></tr>
<tr><td> <code>^</code> </td><td> <emu-xref aoid="Number::bitwiseXOR" id="_ref_6784"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-bitwiseXOR">Number::bitwiseXOR</a></emu-xref> </td></tr>
<tr><td> <code>|</code> </td><td> <emu-xref aoid="Number::bitwiseOR" id="_ref_6785"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-bitwiseOR">Number::bitwiseOR</a></emu-xref> </td></tr>
</tbody>
</table>
</figure></li></ol></li><li>Return <var>operation</var>(<var>lNum</var>, <var>rNum</var>).</li></ol></emu-alg>
<emu-note><span class="note">Note 1</span><div class="note-contents">
<p>No hint is provided in the calls to <emu-xref aoid="ToPrimitive" id="_ref_6786"><a href="abstract-operations.html#sec-toprimitive">ToPrimitive</a></emu-xref> in steps <emu-xref href="#step-binary-op-toprimitive-lval" id="_ref_436"><a href="ecmascript-language-expressions.html#step-binary-op-toprimitive-lval">1.a</a></emu-xref> and <emu-xref href="#step-binary-op-toprimitive-rval" id="_ref_437"><a href="ecmascript-language-expressions.html#step-binary-op-toprimitive-rval">1.b</a></emu-xref>. All standard objects except Dates handle the absence of a hint as if <emu-const>number</emu-const> were given; Dates handle the absence of a hint as if <emu-const>string</emu-const> were given. <emu-xref href="#exotic-object" id="_ref_6787"><a href="ecmascript-data-types-and-values.html#exotic-object">Exotic objects</a></emu-xref> may handle the absence of a hint in some other manner.</p>
</div></emu-note>
<emu-note><span class="note">Note 2</span><div class="note-contents">
<p>Step <emu-xref href="#step-binary-op-string-check" id="_ref_438"><a href="ecmascript-language-expressions.html#step-binary-op-string-check">1.c</a></emu-xref> differs from step <emu-xref href="#step-arc-string-check" id="_ref_439"><a href="abstract-operations.html#step-arc-string-check">3</a></emu-xref> of the <emu-xref aoid="IsLessThan" id="_ref_6788"><a href="abstract-operations.html#sec-islessthan">IsLessThan</a></emu-xref> algorithm, by using the logical-or operation instead of the logical-and operation.</p>
</div></emu-note>
</emu-clause>
<emu-clause id="sec-evaluatestringornumericbinaryexpression" type="abstract operation" aoid="EvaluateStringOrNumericBinaryExpression">
<h1><span class="secnum">13.15.4</span> EvaluateStringOrNumericBinaryExpression ( <var>leftOperand</var>, <var>opText</var>, <var>rightOperand</var> )</h1>
<p>The abstract operation EvaluateStringOrNumericBinaryExpression takes arguments <var>leftOperand</var> (a <emu-xref href="#sec-syntactic-grammar" id="_ref_6789"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>), <var>opText</var> (a sequence of Unicode code points), and <var>rightOperand</var> (a <emu-xref href="#sec-syntactic-grammar" id="_ref_6790"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6791"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> either a String, a BigInt, or a Number, or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6792"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6793"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <var>leftOperand</var>.</li><li>Let <var>lVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6794"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6795"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <var>rightOperand</var>.</li><li>Let <var>rVal</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6796"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li><li>Return ?&nbsp;<emu-xref aoid="ApplyStringOrNumericBinaryOperator" id="_ref_6797"><a href="ecmascript-language-expressions.html#sec-applystringornumericbinaryoperator" class="e-user-code">ApplyStringOrNumericBinaryOperator</a></emu-xref>(<var>lVal</var>, <var>opText</var>, <var>rVal</var>).</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-destructuring-assignment">
<h1><span class="secnum">13.15.5</span> Destructuring Assignment</h1>
<h2>Supplemental Syntax</h2>
<p>
In certain circumstances when processing an instance of the production<br>
<emu-grammar><emu-production name="AssignmentExpression" collapsed="" class=" inline">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ijpo4eaq">
<emu-nt id="_ref_21242"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>
<emu-t>=</emu-t>
<emu-nt id="_ref_21243"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar><br>
the interpretation of <emu-nt id="_ref_21244"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is refined using the following grammar:
</p>
<emu-grammar type="definition"><emu-production name="AssignmentPattern" params="Yield, Await" id="prod-AssignmentPattern">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-AssignmentPattern">AssignmentPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="7w04vwf-">
<emu-nt params="?Yield, ?Await" id="_ref_21245"><a href="ecmascript-language-expressions.html#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="s2vx3ypi">
<emu-nt params="?Yield, ?Await" id="_ref_21246"><a href="ecmascript-language-expressions.html#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="ObjectAssignmentPattern" params="Yield, Await" id="prod-ObjectAssignmentPattern">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gbpaspne" id="prod-Ix53lok1">
<emu-t>{</emu-t>
<emu-t>}</emu-t>
</emu-rhs>
<emu-rhs a="bn_ddxqp" id="prod-O0K_hLF1">
<emu-t>{</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21247"><a href="ecmascript-language-expressions.html#prod-AssignmentRestProperty">AssignmentRestProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
<emu-rhs a="ofajfz5a" id="prod-3uSyi6IT">
<emu-t>{</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21248"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
<emu-rhs a="da4bl21i" id="prod-S2lwsZIP">
<emu-t>{</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21249"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt params="?Yield, ?Await" optional="" id="_ref_21250"><a href="ecmascript-language-expressions.html#prod-AssignmentRestProperty">AssignmentRestProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="ArrayAssignmentPattern" params="Yield, Await" id="prod-ArrayAssignmentPattern">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="s4zfck54" id="prod-lF9xCwj2">
<emu-t>[</emu-t>
<emu-nt optional="" id="_ref_21251"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" optional="" id="_ref_21252"><a href="ecmascript-language-expressions.html#prod-AssignmentRestElement">AssignmentRestElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
<emu-rhs a="mfk9jesb" id="prod-VmyFmgP-">
<emu-t>[</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21253"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
<emu-rhs a="aerg5q0_" id="prod-U5w44WHu">
<emu-t>[</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21254"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt optional="" id="_ref_21255"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" optional="" id="_ref_21256"><a href="ecmascript-language-expressions.html#prod-AssignmentRestElement">AssignmentRestElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
<emu-production name="AssignmentRestProperty" params="Yield, Await" id="prod-AssignmentRestProperty">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-AssignmentRestProperty">AssignmentRestProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="nliyfd0x" id="prod-mUDd8nHs">
<emu-t>...</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21257"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="AssignmentPropertyList" params="Yield, Await" id="prod-AssignmentPropertyList">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="d7bxrpgd">
<emu-nt params="?Yield, ?Await" id="_ref_21258"><a href="ecmascript-language-expressions.html#prod-AssignmentProperty">AssignmentProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="nzqocjsg" id="prod-Zg8oWRHF">
<emu-nt params="?Yield, ?Await" id="_ref_21259"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21260"><a href="ecmascript-language-expressions.html#prod-AssignmentProperty">AssignmentProperty</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="AssignmentElementList" params="Yield, Await" id="prod-AssignmentElementList">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="516o8fhi" id="prod-3BNUmQs7">
<emu-nt params="?Yield, ?Await" id="_ref_21261"><a href="ecmascript-language-expressions.html#prod-AssignmentElisionElement">AssignmentElisionElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="bvlhnxkw" id="prod-Ud4u6J-Q">
<emu-nt params="?Yield, ?Await" id="_ref_21262"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21263"><a href="ecmascript-language-expressions.html#prod-AssignmentElisionElement">AssignmentElisionElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="AssignmentElisionElement" params="Yield, Await" id="prod-AssignmentElisionElement">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-AssignmentElisionElement">AssignmentElisionElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="cv0avln-" id="prod-sl9Zadb9">
<emu-nt optional="" id="_ref_21264"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt params="?Yield, ?Await" id="_ref_21265"><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="AssignmentProperty" params="Yield, Await" id="prod-AssignmentProperty">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-AssignmentProperty">AssignmentProperty</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="wctqknbn" id="prod-3q7yGYEa">
<emu-nt params="?Yield, ?Await" id="_ref_21266"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_21267"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="n656b85q" id="prod-v1dWCZ87">
<emu-nt params="?Yield, ?Await" id="_ref_21268"><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>:</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21269"><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="AssignmentElement" params="Yield, Await" id="prod-AssignmentElement">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="jfyxygbf" id="prod-qvQWEQo1">
<emu-nt params="?Yield, ?Await" id="_ref_21270"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-nt params="+In, ?Yield, ?Await" optional="" id="_ref_21271"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a><emu-mods><emu-params>[+In, ?Yield, ?Await]</emu-params><emu-opt>opt</emu-opt></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="AssignmentRestElement" params="Yield, Await" id="prod-AssignmentRestElement">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-AssignmentRestElement">AssignmentRestElement</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="nliyfd0x" id="prod-DMURMN0m">
<emu-t>...</emu-t>
<emu-nt params="?Yield, ?Await" id="_ref_21272"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
<emu-production name="DestructuringAssignmentTarget" params="Yield, Await" id="prod-DestructuringAssignmentTarget">
<emu-nt params="Yield, Await"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a><emu-mods><emu-params>[Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="t7cmhicy">
<emu-nt params="?Yield, ?Await" id="_ref_21273"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a><emu-mods><emu-params>[?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-destructuring-assignment-static-semantics-early-errors">
<h1><span class="secnum">13.15.5.1</span> Static Semantics: Early Errors</h1>
<emu-grammar><emu-production name="AssignmentProperty" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentProperty">AssignmentProperty</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="xv93cfyb">
<emu-nt id="_ref_21274"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt>
<emu-nt optional="" id="_ref_21275"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if the <emu-xref aoid="AssignmentTargetType" id="_ref_6798"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_21276"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt> is not <emu-const>simple</emu-const>.
</li>
</ul>
<emu-grammar><emu-production name="AssignmentRestProperty" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="z0cmdp2o">
<emu-t>...</emu-t>
<emu-nt id="_ref_21277"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
It is a Syntax Error if <emu-nt id="_ref_21278"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is either an <emu-nt id="_ref_21279"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt> or an <emu-nt id="_ref_21280"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt>.
</li>
</ul>
<emu-grammar><emu-production name="DestructuringAssignmentTarget" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="glqbepvz"><emu-nt id="_ref_21281"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<ul>
<li>
If <emu-nt id="_ref_21282"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is either an <emu-nt id="_ref_21283"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_21284"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, <emu-nt id="_ref_21285"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> <emu-xref href="#must-cover" id="_ref_6799"><a href="notational-conventions.html#must-cover">must cover</a></emu-xref> an <emu-nt id="_ref_21286"><a href="ecmascript-language-expressions.html#prod-AssignmentPattern">AssignmentPattern</a></emu-nt>.
</li>
<li>
If <emu-nt id="_ref_21287"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is neither an <emu-nt id="_ref_21288"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_21289"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, it is a Syntax Error if the <emu-xref aoid="AssignmentTargetType" id="_ref_6800"><a href="syntax-directed-operations.html#sec-static-semantics-assignmenttargettype">AssignmentTargetType</a></emu-xref> of <emu-nt id="_ref_21290"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt> is not <emu-const>simple</emu-const>.
</li>
</ul>
</emu-clause>
<emu-clause id="sec-runtime-semantics-destructuringassignmentevaluation" type="sdo" aoid="DestructuringAssignmentEvaluation">
<h1><span class="secnum">13.15.5.2</span> Runtime Semantics: DestructuringAssignmentEvaluation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6801"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> DestructuringAssignmentEvaluation takes argument <var>value</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6802"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6803"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> <emu-const>unused</emu-const> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6804"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="ObjectAssignmentPattern" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gbpaspne" id="prod-3gUcVFuf">
<emu-t>{</emu-t>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_6805"><a href="abstract-operations.html#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>value</var>).</li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectAssignmentPattern">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="atdycebx" id="prod-BL-EfQkR">
<emu-t>{</emu-t>
<emu-nt id="_ref_21291"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
<emu-rhs a="gxeg7dx1" id="prod-w0nDUCli">
<emu-t>{</emu-t>
<emu-nt id="_ref_21292"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt>
<emu-t>,</emu-t>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_6806"><a href="abstract-operations.html#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>value</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="PropertyDestructuringAssignmentEvaluation" id="_ref_6807"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-propertydestructuringassignmentevaluation" class="e-user-code">PropertyDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21293"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt> with argument <var>value</var>.</li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectAssignmentPattern" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="0_acgxxx" id="prod-V79sItM3">
<emu-t>{</emu-t>
<emu-nt id="_ref_21294"><a href="ecmascript-language-expressions.html#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_6808"><a href="abstract-operations.html#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>value</var>).</li><li>Let <var>excludedNames</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6809"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return ?&nbsp;<emu-xref aoid="RestDestructuringAssignmentEvaluation" id="_ref_6810"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-restdestructuringassignmentevaluation" class="e-user-code">RestDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21295"><a href="ecmascript-language-expressions.html#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt> with arguments <var>value</var> and <var>excludedNames</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ObjectAssignmentPattern" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ObjectAssignmentPattern">ObjectAssignmentPattern</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="s8lxpw-f" id="prod-c6GsLBP6">
<emu-t>{</emu-t>
<emu-nt id="_ref_21296"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt id="_ref_21297"><a href="ecmascript-language-expressions.html#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt>
<emu-t>}</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="RequireObjectCoercible" id="_ref_6811"><a href="abstract-operations.html#sec-requireobjectcoercible">RequireObjectCoercible</a></emu-xref>(<var>value</var>).</li><li>Let <var>excludedNames</var> be ?&nbsp;<emu-xref aoid="PropertyDestructuringAssignmentEvaluation" id="_ref_6812"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-propertydestructuringassignmentevaluation" class="e-user-code">PropertyDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21298"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt> with argument <var>value</var>.</li><li>Return ?&nbsp;<emu-xref aoid="RestDestructuringAssignmentEvaluation" id="_ref_6813"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-restdestructuringassignmentevaluation" class="e-user-code">RestDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21299"><a href="ecmascript-language-expressions.html#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt> with arguments <var>value</var> and <var>excludedNames</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayAssignmentPattern" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="mdhsnk3i" id="prod-EbrhbyXb">
<emu-t>[</emu-t>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6814"><a href="abstract-operations.html#sec-getiterator" class="e-user-code">GetIterator</a></emu-xref>(<var>value</var>, <emu-const>sync</emu-const>).</li><li>Return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_6815"><a href="abstract-operations.html#sec-iteratorclose" class="e-user-code">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <emu-xref aoid="NormalCompletion" id="_ref_6816"><a href="ecmascript-data-types-and-values.html#sec-normalcompletion">NormalCompletion</a></emu-xref>(<emu-const>unused</emu-const>)).</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayAssignmentPattern" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="mf_msvtp" id="prod-zzOr3EoW">
<emu-t>[</emu-t>
<emu-nt id="_ref_21300"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6817"><a href="abstract-operations.html#sec-getiterator" class="e-user-code">GetIterator</a></emu-xref>(<var>value</var>, <emu-const>sync</emu-const>).</li><li>Let <var>result</var> be <emu-xref aoid="Completion" id="_ref_6818"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6819"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21301"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with argument <var>iteratorRecord</var>).</li><li>If <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_6820"><a href="abstract-operations.html#sec-iteratorclose" class="e-user-code">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>result</var>).</li><li>Return <var>result</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayAssignmentPattern" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="cmqzbdyo" id="prod--ENeYZ8i">
<emu-t>[</emu-t>
<emu-nt optional="" id="_ref_21302"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt id="_ref_21303"><a href="ecmascript-language-expressions.html#prod-AssignmentRestElement">AssignmentRestElement</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6821"><a href="abstract-operations.html#sec-getiterator" class="e-user-code">GetIterator</a></emu-xref>(<var>value</var>, <emu-const>sync</emu-const>).</li><li>If <emu-nt id="_ref_21304"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Let <var>status</var> be <emu-xref aoid="Completion" id="_ref_6822"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6823"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21305"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with argument <var>iteratorRecord</var>).</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6824"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li><emu-xref href="#assert" id="_ref_6825"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>true</emu-val>.</li><li>Return ?&nbsp;<var>status</var>.</li></ol></li></ol></li><li>Let <var>result</var> be <emu-xref aoid="Completion" id="_ref_6826"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6827"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21306"><a href="ecmascript-language-expressions.html#prod-AssignmentRestElement">AssignmentRestElement</a></emu-nt> with argument <var>iteratorRecord</var>).</li><li>If <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_6828"><a href="abstract-operations.html#sec-iteratorclose" class="e-user-code">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>result</var>).</li><li>Return <var>result</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayAssignmentPattern" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gv7ks9wy" id="prod-IYCbjDvt">
<emu-t>[</emu-t>
<emu-nt id="_ref_21307"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6829"><a href="abstract-operations.html#sec-getiterator" class="e-user-code">GetIterator</a></emu-xref>(<var>value</var>, <emu-const>sync</emu-const>).</li><li>Let <var>result</var> be <emu-xref aoid="Completion" id="_ref_6830"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6831"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21308"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a></emu-nt> with argument <var>iteratorRecord</var>).</li><li>If <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_6832"><a href="abstract-operations.html#sec-iteratorclose" class="e-user-code">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>result</var>).</li><li>Return <var>result</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="ArrayAssignmentPattern" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-ArrayAssignmentPattern">ArrayAssignmentPattern</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="ztneawav" id="prod-GIS42l5L">
<emu-t>[</emu-t>
<emu-nt id="_ref_21309"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt optional="" id="_ref_21310"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-nt optional="" id="_ref_21311"><a href="ecmascript-language-expressions.html#prod-AssignmentRestElement">AssignmentRestElement</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
<emu-t>]</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIterator" id="_ref_6833"><a href="abstract-operations.html#sec-getiterator" class="e-user-code">GetIterator</a></emu-xref>(<var>value</var>, <emu-const>sync</emu-const>).</li><li>Let <var>status</var> be <emu-xref aoid="Completion" id="_ref_6834"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6835"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21312"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a></emu-nt> with argument <var>iteratorRecord</var>).</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6836"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>If <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_6837"><a href="abstract-operations.html#sec-iteratorclose" class="e-user-code">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).</li><li>Return ?&nbsp;<var>status</var>.</li></ol></li><li>If <emu-nt id="_ref_21313"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> is present, then<ol><li>Set <var>status</var> to <emu-xref aoid="Completion" id="_ref_6838"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6839"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21314"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with argument <var>iteratorRecord</var>).</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6840"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li><emu-xref href="#assert" id="_ref_6841"><a href="notational-conventions.html#assert">Assert</a></emu-xref>: <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>true</emu-val>.</li><li>Return ?&nbsp;<var>status</var>.</li></ol></li></ol></li><li>If <emu-nt id="_ref_21315"><a href="ecmascript-language-expressions.html#prod-AssignmentRestElement">AssignmentRestElement</a></emu-nt> is present, then<ol><li>Set <var>status</var> to <emu-xref aoid="Completion" id="_ref_6842"><a href="notational-conventions.html#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6843"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21316"><a href="ecmascript-language-expressions.html#prod-AssignmentRestElement">AssignmentRestElement</a></emu-nt> with argument <var>iteratorRecord</var>).</li></ol></li><li>If <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>false</emu-val>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_6844"><a href="abstract-operations.html#sec-iteratorclose" class="e-user-code">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>status</var>).</li><li>Return ?&nbsp;<var>status</var>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-propertydestructuringassignmentevaluation" type="sdo" aoid="PropertyDestructuringAssignmentEvaluation">
<h1><span class="secnum">13.15.5.3</span> Runtime Semantics: PropertyDestructuringAssignmentEvaluation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6845"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> PropertyDestructuringAssignmentEvaluation takes argument <var>value</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6846"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6847"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6848"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-xref href="#property-key" id="_ref_6849"><a href="ecmascript-data-types-and-values.html#property-key">property keys</a></emu-xref> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6850"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It collects a list of all destructured <emu-xref href="#property-key" id="_ref_6851"><a href="ecmascript-data-types-and-values.html#property-key">property keys</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="AssignmentPropertyList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="w2gewbq6" id="prod-ysaEPEoc">
<emu-nt id="_ref_21317"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt id="_ref_21318"><a href="ecmascript-language-expressions.html#prod-AssignmentProperty">AssignmentProperty</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>propertyNames</var> be ?&nbsp;<emu-xref aoid="PropertyDestructuringAssignmentEvaluation" id="_ref_6852"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-propertydestructuringassignmentevaluation" class="e-user-code">PropertyDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21319"><a href="ecmascript-language-expressions.html#prod-AssignmentPropertyList">AssignmentPropertyList</a></emu-nt> with argument <var>value</var>.</li><li>Let <var>nextNames</var> be ?&nbsp;<emu-xref aoid="PropertyDestructuringAssignmentEvaluation" id="_ref_6853"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-propertydestructuringassignmentevaluation" class="e-user-code">PropertyDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21320"><a href="ecmascript-language-expressions.html#prod-AssignmentProperty">AssignmentProperty</a></emu-nt> with argument <var>value</var>.</li><li>Return the <emu-xref href="#list-concatenation" id="_ref_6854"><a href="ecmascript-data-types-and-values.html#list-concatenation">list-concatenation</a></emu-xref> of <var>propertyNames</var> and <var>nextNames</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentProperty" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentProperty">AssignmentProperty</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="xv93cfyb" id="prod-yhW4Xo3o">
<emu-nt id="_ref_21321"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt>
<emu-nt optional="" id="_ref_21322"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>P</var> be the <emu-xref aoid="StringValue" id="_ref_6855"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_21323"><a href="ecmascript-language-expressions.html#prod-IdentifierReference">IdentifierReference</a></emu-nt>.</li><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="ResolveBinding" id="_ref_6856"><a href="executable-code-and-execution-contexts.html#sec-resolvebinding" class="e-user-code">ResolveBinding</a></emu-xref>(<var>P</var>).</li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="GetV" id="_ref_6857"><a href="abstract-operations.html#sec-getv" class="e-user-code">GetV</a></emu-xref>(<var>value</var>, <var>P</var>).</li><li>If <emu-nt id="_ref_21324"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt> is present and <var>v</var> is <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_6858"><a href="syntax-directed-operations.html#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_21325"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt>) is <emu-val>true</emu-val>, then<ol><li>Set <var>v</var> to ?&nbsp;<emu-xref aoid="NamedEvaluation" id="_ref_6859"><a href="syntax-directed-operations.html#sec-runtime-semantics-namedevaluation" class="e-user-code">NamedEvaluation</a></emu-xref> of <emu-nt id="_ref_21326"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt> with argument <var>P</var>.</li></ol></li><li>Else,<ol><li>Let <var>defaultValue</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6860"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21327"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt>.</li><li>Set <var>v</var> to ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6861"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li></ol></li><li>Perform ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6862"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>v</var>).</li><li>Return « <var>P</var>&nbsp;».</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentProperty" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentProperty">AssignmentProperty</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="yayigkhd" id="prod-P2UQDIgF">
<emu-nt id="_ref_21328"><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a></emu-nt>
<emu-t>:</emu-t>
<emu-nt id="_ref_21329"><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>name</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6863"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21330"><a href="ecmascript-language-expressions.html#prod-PropertyName">PropertyName</a></emu-nt>.</li><li>Perform ?&nbsp;<emu-xref aoid="KeyedDestructuringAssignmentEvaluation" id="_ref_6864"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-keyeddestructuringassignmentevaluation" class="e-user-code">KeyedDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21331"><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a></emu-nt> with arguments <var>value</var> and <var>name</var>.</li><li>Return « <var>name</var>&nbsp;».</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-restdestructuringassignmentevaluation" type="sdo" aoid="RestDestructuringAssignmentEvaluation">
<h1><span class="secnum">13.15.5.4</span> Runtime Semantics: RestDestructuringAssignmentEvaluation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6865"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> RestDestructuringAssignmentEvaluation takes arguments <var>value</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6866"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>) and <var>excludedNames</var> (a <emu-xref href="#sec-list-and-record-specification-type" id="_ref_6867"><a href="ecmascript-data-types-and-values.html#sec-list-and-record-specification-type">List</a></emu-xref> of <emu-xref href="#property-key" id="_ref_6868"><a href="ecmascript-data-types-and-values.html#property-key">property keys</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6869"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> <emu-const>unused</emu-const> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6870"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="AssignmentRestProperty" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentRestProperty">AssignmentRestProperty</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="z0cmdp2o" id="prod-uer86s2s">
<emu-t>...</emu-t>
<emu-nt id="_ref_21332"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6871"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21333"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li>Let <var>restObj</var> be <emu-xref aoid="OrdinaryObjectCreate" id="_ref_6872"><a href="ordinary-and-exotic-objects-behaviours.html#sec-ordinaryobjectcreate">OrdinaryObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object" id="_ref_6873"><a href="fundamental-objects.html#sec-properties-of-the-object-prototype-object">%Object.prototype%</a></emu-xref>).</li><li>Perform ?&nbsp;<emu-xref aoid="CopyDataProperties" id="_ref_6874"><a href="abstract-operations.html#sec-copydataproperties" class="e-user-code">CopyDataProperties</a></emu-xref>(<var>restObj</var>, <var>value</var>, <var>excludedNames</var>).</li><li>Return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6875"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>restObj</var>).</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-iteratordestructuringassignmentevaluation" type="sdo" aoid="IteratorDestructuringAssignmentEvaluation">
<h1><span class="secnum">13.15.5.5</span> Runtime Semantics: IteratorDestructuringAssignmentEvaluation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6876"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> IteratorDestructuringAssignmentEvaluation takes argument <var>iteratorRecord</var> (an <emu-xref href="#sec-iterator-records" id="_ref_6877"><a href="abstract-operations.html#sec-iterator-records">Iterator Record</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6878"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> <emu-const>unused</emu-const> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6879"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="AssignmentElementList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="4rvubdlp" id="prod-wdwg9MFc"><emu-nt id="_ref_21334"><a href="ecmascript-language-expressions.html#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6880"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21335"><a href="ecmascript-language-expressions.html#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt> with argument <var>iteratorRecord</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentElementList" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="vcxcd5k-" id="prod-LgDa64vV">
<emu-nt id="_ref_21336"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt id="_ref_21337"><a href="ecmascript-language-expressions.html#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6881"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21338"><a href="ecmascript-language-expressions.html#prod-AssignmentElementList">AssignmentElementList</a></emu-nt> with argument <var>iteratorRecord</var>.</li><li>Return ?&nbsp;<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6882"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21339"><a href="ecmascript-language-expressions.html#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt> with argument <var>iteratorRecord</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentElisionElement" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gw1kvoap" id="prod-vVbhdjr0"><emu-nt id="_ref_21340"><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a></emu-nt></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6883"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21341"><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a></emu-nt> with argument <var>iteratorRecord</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentElisionElement" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentElisionElement">AssignmentElisionElement</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="aw9c7xpu" id="prod-gwNUTqrO">
<emu-nt id="_ref_21342"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt>
<emu-nt id="_ref_21343"><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6884"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21344"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with argument <var>iteratorRecord</var>.</li><li>Return ?&nbsp;<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6885"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21345"><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a></emu-nt> with argument <var>iteratorRecord</var>.</li></ol></emu-alg>
<emu-grammar><emu-production name="Elision" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="lhh3u7f7" id="prod-4Wj_oyTQ"><emu-t>,</emu-t></emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>If <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>false</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_6886"><a href="abstract-operations.html#sec-iteratorstep" class="e-user-code">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li></ol></li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
<emu-grammar><emu-production name="Elision" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="gg0bjle3" id="prod-zWmQntmV">
<emu-nt id="_ref_21346"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt>
<emu-t>,</emu-t>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Perform ?&nbsp;<emu-xref aoid="IteratorDestructuringAssignmentEvaluation" id="_ref_6887"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-iteratordestructuringassignmentevaluation" class="e-user-code">IteratorDestructuringAssignmentEvaluation</a></emu-xref> of <emu-nt id="_ref_21347"><a href="ecmascript-language-expressions.html#prod-Elision">Elision</a></emu-nt> with argument <var>iteratorRecord</var>.</li><li>If <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>false</emu-val>, then<ol><li>Perform ?&nbsp;<emu-xref aoid="IteratorStep" id="_ref_6888"><a href="abstract-operations.html#sec-iteratorstep" class="e-user-code">IteratorStep</a></emu-xref>(<var>iteratorRecord</var>).</li></ol></li><li>Return <emu-const>unused</emu-const>.</li></ol></emu-alg>
<emu-grammar><emu-production name="AssignmentElement" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="pzzkz5gu" id="prod-L7cVew9S">
<emu-nt id="_ref_21348"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>
<emu-nt optional="" id="_ref_21349"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_21350"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is neither an <emu-nt id="_ref_21351"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_21352"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6889"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21353"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li></ol></li><li>Let <var>value</var> be <emu-val>undefined</emu-val>.</li><li>If <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>false</emu-val>, then<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStepValue" id="_ref_6890"><a href="abstract-operations.html#sec-iteratorstepvalue" class="e-user-code">IteratorStepValue</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is not <emu-const>done</emu-const>, then<ol><li>Set <var>value</var> to <var>next</var>.</li></ol></li></ol></li><li>If <emu-nt id="_ref_21354"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt> is present and <var>value</var> is <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_6891"><a href="syntax-directed-operations.html#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_21355"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt>) is <emu-val>true</emu-val> and <emu-xref aoid="IsIdentifierRef" id="_ref_6892"><a href="syntax-directed-operations.html#sec-static-semantics-isidentifierref">IsIdentifierRef</a></emu-xref> of <emu-nt id="_ref_21356"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is <emu-val>true</emu-val>, then<ol><li>Let <var>target</var> be the <emu-xref aoid="StringValue" id="_ref_6893"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_21357"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="NamedEvaluation" id="_ref_6894"><a href="syntax-directed-operations.html#sec-runtime-semantics-namedevaluation" class="e-user-code">NamedEvaluation</a></emu-xref> of <emu-nt id="_ref_21358"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt> with argument <var>target</var>.</li></ol></li><li>Else,<ol><li>Let <var>defaultValue</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6895"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21359"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt>.</li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6896"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li></ol></li><li>Else,<ol><li>Let <var>v</var> be <var>value</var>.</li></ol></li><li>If <emu-nt id="_ref_21360"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is either an <emu-nt id="_ref_21361"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_21362"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>nestedAssignmentPattern</var> be the <emu-nt id="_ref_21363"><a href="ecmascript-language-expressions.html#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_6897"><a href="notational-conventions.html#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_21364"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="DestructuringAssignmentEvaluation" id="_ref_6898"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-destructuringassignmentevaluation" class="e-user-code">DestructuringAssignmentEvaluation</a></emu-xref> of <var>nestedAssignmentPattern</var> with argument <var>v</var>.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6899"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>v</var>).</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>Left to right evaluation order is maintained by evaluating a <emu-nt id="_ref_21365"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> that is not a destructuring pattern prior to accessing the <emu-xref href="#sec-iterator-interface" id="_ref_6900"><a href="control-abstraction-objects.html#sec-iterator-interface">iterator</a></emu-xref> or evaluating the <emu-nt id="_ref_21366"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt>.</p>
</div></emu-note>
<emu-grammar><emu-production name="AssignmentRestElement" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentRestElement">AssignmentRestElement</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="z0cmdp2o" id="prod-NB8JhQlN">
<emu-t>...</emu-t>
<emu-nt id="_ref_21367"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_21368"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is neither an <emu-nt id="_ref_21369"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_21370"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6901"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21371"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li></ol></li><li>Let <var>A</var> be !&nbsp;<emu-xref aoid="ArrayCreate" id="_ref_6902"><a href="ordinary-and-exotic-objects-behaviours.html#sec-arraycreate">ArrayCreate</a></emu-xref>(0).</li><li>Let <var>n</var> be 0.</li><li>Repeat, while <var>iteratorRecord</var>.<var class="field">[[Done]]</var> is <emu-val>false</emu-val>,<ol><li>Let <var>next</var> be ?&nbsp;<emu-xref aoid="IteratorStepValue" id="_ref_6903"><a href="abstract-operations.html#sec-iteratorstepvalue" class="e-user-code">IteratorStepValue</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>next</var> is not <emu-const>done</emu-const>, then<ol><li>Perform !&nbsp;<emu-xref aoid="CreateDataPropertyOrThrow" id="_ref_6904"><a href="abstract-operations.html#sec-createdatapropertyorthrow">CreateDataPropertyOrThrow</a></emu-xref>(<var>A</var>, !&nbsp;<emu-xref aoid="ToString" id="_ref_6905"><a href="abstract-operations.html#sec-tostring">ToString</a></emu-xref>(<emu-xref aoid="𝔽" id="_ref_6906"><a href="notational-conventions.html#%F0%9D%94%BD">𝔽</a></emu-xref>(<var>n</var>)), <var>next</var>).</li><li>Set <var>n</var> to <var>n</var> + 1.</li></ol></li></ol></li><li>If <emu-nt id="_ref_21372"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is neither an <emu-nt id="_ref_21373"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_21374"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6907"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>A</var>).</li></ol></li><li>Let <var>nestedAssignmentPattern</var> be the <emu-nt id="_ref_21375"><a href="ecmascript-language-expressions.html#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_6908"><a href="notational-conventions.html#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_21376"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="DestructuringAssignmentEvaluation" id="_ref_6909"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-destructuringassignmentevaluation" class="e-user-code">DestructuringAssignmentEvaluation</a></emu-xref> of <var>nestedAssignmentPattern</var> with argument <var>A</var>.</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-runtime-semantics-keyeddestructuringassignmentevaluation" type="sdo" aoid="KeyedDestructuringAssignmentEvaluation">
<h1><span class="secnum">13.15.5.6</span> Runtime Semantics: KeyedDestructuringAssignmentEvaluation</h1>
<p>The <emu-xref href="#sec-algorithm-conventions-syntax-directed-operations" id="_ref_6910"><a href="notational-conventions.html#sec-algorithm-conventions-syntax-directed-operations">syntax-directed operation</a></emu-xref> KeyedDestructuringAssignmentEvaluation takes arguments <var>value</var> (an <emu-xref href="#sec-ecmascript-language-types" id="_ref_6911"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types">ECMAScript language value</a></emu-xref>) and <var>propertyName</var> (a <emu-xref href="#property-key" id="_ref_6912"><a href="ecmascript-data-types-and-values.html#property-key">property key</a></emu-xref>) and returns either a <emu-xref href="#sec-completion-record-specification-type" id="_ref_6913"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> <emu-const>unused</emu-const> or an <emu-xref href="#sec-completion-record-specification-type" id="_ref_6914"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">abrupt completion</a></emu-xref>. It is defined piecewise over the following productions:</p>
<emu-grammar><emu-production name="AssignmentElement" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-AssignmentElement">AssignmentElement</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="pzzkz5gu" id="prod-M4lsIchc">
<emu-nt id="_ref_21377"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>
<emu-nt optional="" id="_ref_21378"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a><emu-mods><emu-opt>opt</emu-opt></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>If <emu-nt id="_ref_21379"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is neither an <emu-nt id="_ref_21380"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> nor an <emu-nt id="_ref_21381"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6915"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21382"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li></ol></li><li>Let <var>v</var> be ?&nbsp;<emu-xref aoid="GetV" id="_ref_6916"><a href="abstract-operations.html#sec-getv" class="e-user-code">GetV</a></emu-xref>(<var>value</var>, <var>propertyName</var>).</li><li>If <emu-nt id="_ref_21383"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt> is present and <var>v</var> is <emu-val>undefined</emu-val>, then<ol><li>If <emu-xref aoid="IsAnonymousFunctionDefinition" id="_ref_6917"><a href="syntax-directed-operations.html#sec-isanonymousfunctiondefinition">IsAnonymousFunctionDefinition</a></emu-xref>(<emu-nt id="_ref_21384"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt>) is <emu-val>true</emu-val> and <emu-xref aoid="IsIdentifierRef" id="_ref_6918"><a href="syntax-directed-operations.html#sec-static-semantics-isidentifierref">IsIdentifierRef</a></emu-xref> of <emu-nt id="_ref_21385"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is <emu-val>true</emu-val>, then<ol><li>Let <var>target</var> be the <emu-xref aoid="StringValue" id="_ref_6919"><a href="ecmascript-language-expressions.html#sec-static-semantics-stringvalue">StringValue</a></emu-xref> of <emu-nt id="_ref_21386"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li>Let <var>rhsValue</var> be ?&nbsp;<emu-xref aoid="NamedEvaluation" id="_ref_6920"><a href="syntax-directed-operations.html#sec-runtime-semantics-namedevaluation" class="e-user-code">NamedEvaluation</a></emu-xref> of <emu-nt id="_ref_21387"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt> with argument <var>target</var>.</li></ol></li><li>Else,<ol><li>Let <var>defaultValue</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6921"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21388"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt>.</li><li>Let <var>rhsValue</var> be ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6922"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>defaultValue</var>).</li></ol></li></ol></li><li>Else,<ol><li>Let <var>rhsValue</var> be <var>v</var>.</li></ol></li><li>If <emu-nt id="_ref_21389"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt> is either an <emu-nt id="_ref_21390"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> or an <emu-nt id="_ref_21391"><a href="ecmascript-language-expressions.html#prod-ArrayLiteral">ArrayLiteral</a></emu-nt>, then<ol><li>Let <var>assignmentPattern</var> be the <emu-nt id="_ref_21392"><a href="ecmascript-language-expressions.html#prod-AssignmentPattern">AssignmentPattern</a></emu-nt> that is <emu-xref href="#sec-syntactic-grammar" id="_ref_6923"><a href="notational-conventions.html#sec-syntactic-grammar">covered</a></emu-xref> by <emu-nt id="_ref_21393"><a href="ecmascript-language-expressions.html#prod-DestructuringAssignmentTarget">DestructuringAssignmentTarget</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="DestructuringAssignmentEvaluation" id="_ref_6924"><a href="ecmascript-language-expressions.html#sec-runtime-semantics-destructuringassignmentevaluation" class="e-user-code">DestructuringAssignmentEvaluation</a></emu-xref> of <var>assignmentPattern</var> with argument <var>rhsValue</var>.</li></ol></li><li>Return ?&nbsp;<emu-xref aoid="PutValue" id="_ref_6925"><a href="ecmascript-data-types-and-values.html#sec-putvalue" class="e-user-code">PutValue</a></emu-xref>(<var>lRef</var>, <var>rhsValue</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
<emu-clause id="sec-comma-operator">
<h1><span class="secnum">13.16</span> Comma Operator ( <code>,</code> )</h1>
<h2>Syntax</h2>
<emu-grammar type="definition"><emu-production name="Expression" params="In, Yield, Await" id="prod-Expression">
<emu-nt params="In, Yield, Await"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[In, Yield, Await]</emu-params></emu-mods></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="dtjihnfx" id="prod-0GReIdCH">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21394"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
<emu-rhs a="ookiljzl" id="prod-lT8vYmn_">
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21395"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
<emu-t>,</emu-t>
<emu-nt params="?In, ?Yield, ?Await" id="_ref_21396"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a><emu-mods><emu-params>[?In, ?Yield, ?Await]</emu-params></emu-mods></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-clause id="sec-comma-operator-runtime-semantics-evaluation" type="sdo">
<h1><span class="secnum">13.16.1</span> Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="Expression" collapsed="">
<emu-nt><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt> <emu-geq>:</emu-geq> <emu-rhs a="cwoazx1t" id="prod-9ohd9wHn">
<emu-nt id="_ref_21397"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>
<emu-t>,</emu-t>
<emu-nt id="_ref_21398"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
</emu-rhs>
</emu-production>
</emu-grammar>
<emu-alg><ol><li>Let <var>lRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6926"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21399"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>.</li><li>Perform ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6927"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>lRef</var>).</li><li>Let <var>rRef</var> be ?&nbsp;<emu-xref aoid="Evaluation" id="_ref_6928"><a href="syntax-directed-operations.html#sec-evaluation" class="e-user-code">Evaluation</a></emu-xref> of <emu-nt id="_ref_21400"><a href="ecmascript-language-expressions.html#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Return ?&nbsp;<emu-xref aoid="GetValue" id="_ref_6929"><a href="ecmascript-data-types-and-values.html#sec-getvalue" class="e-user-code">GetValue</a></emu-xref>(<var>rRef</var>).</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p><emu-xref aoid="GetValue" id="_ref_6930"><a href="ecmascript-data-types-and-values.html#sec-getvalue">GetValue</a></emu-xref> must be called even though its value is not used because it may have observable side-effects.</p>
</div></emu-note>
</emu-clause>
</emu-clause>
</emu-clause></div></body></html>